input-output-hk / input-output-hk/Lean-blaster

Handling of Type Class and Structure properties

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
area: smt enhancement
Dominant language
Lean
Stars
57
Forks
11
Avg merge
1d 5h
Merged PRs (30d)
10

Description

Here is a need to properly handle type class and structure properties when translating to SMTLIB.
Indeed, we need to generate the proper assertions for type class instances, type class constraints as well as structure instances.
For instance, we should be able to automatically generate the necessary assertions for the given type class:
```lean
class Eq (α : Type) where
eq : α -> α -> Bool

/-- Properties on equality that need to be proved for each Eq instance. -/
eq_reflexive : ∀ (x : α), eq x x
eq_symmetric : ∀ (x y : α), eq x y → eq y x
eq_transitive : ∀ (x y z : α), eq x y → eq y z → eq x z
eq_commute : ∀ (x y : α), eq x y = eq y x
eq_equiv_struct_eq : ∀ (x y : α), eq x y → x = y
```

---
**Transferred from:** input-output-hk/sc-fvt#245

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the translation path from Lean type classes and structures to SMTLIB. Define the required assertions for type class instances, type class constraints, and structure instances, using the Eq example as a reference; done means these properties are generated automatically.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.