A variable with a name, and whether it is proof irrelevant (unused).
Instances For
The value of a let declaration, which can be a term, custom reduction behavior (like recursor), or opaque.
- definition (term : Tm) : Value
- constructor (type : String) (index argsStart : USize) : Value
- recursor (type : String) (rules : Array Tm) (shared major : USize) : Value
- projection (type : String) (index major : USize) : Value
- opaque : Value
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- Canonical.instToStringTm = { toString := Canonical.termToString }
Equations
- Canonical.instToStringTyp = { toString := Canonical.typToString }
Start a server with the refinement UI on the given type.
Some Lean Π-types cannot be converted into Canonical Π-types, and are instead converted into this structure.
- f (a : A) : B a
Instances For
Rather than recursively unfolding definitions, HARD_CODE overrides
the definitions introduced by a given symbol.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
When translating to Canonical, we maintain a state of translated constant symbols.
Instances For
For readability, we identify free variables by their userName,
but with the suffix of the FVarId.name for completeness.
Equations
- Canonical.name (Lean.Expr.fvar fvarId) = do let __do_lift ← fvarId.getUserName pure (fvarId.name.updatePrefix __do_lift.getRoot)
- Canonical.name x✝ = panicWithPosWithDecl "Canonical" "Canonical.name" 108 7 "name of non-fvar"
Instances For
Equations
- Canonical.nameString e = do let __do_lift ← Canonical.name e pure __do_lift.toString
Instances For
The default arity of a type e.
The arities of the types of the parameters of type e.
Equations
- One or more equations did not get rendered due to their size.
- Canonical.isOpaque (Lean.ConstantInfo.recInfo val) = do let __do_lift ← Lean.isIrreducible (Lean.ConstantInfo.recInfo val).name if __do_lift = true then pure false else pure true
- Canonical.isOpaque info = do let __do_lift ← Lean.isIrreducible info.name if __do_lift = true then pure false else pure false
Instances For
Equations
- Canonical.includeLetType (fn.app arg) = (Canonical.includeLetType fn <||> Canonical.includeLetType arg)
- Canonical.includeLetType (Lean.Expr.lam binderName binderType body binderInfo) = Canonical.includeLetType body
- Canonical.includeLetType (Lean.Expr.forallE binderName binderType body binderInfo) = Canonical.includeLetType body
- Canonical.includeLetType (Lean.Expr.letE declName type value body nonDep) = Canonical.includeLetType body
- Canonical.includeLetType (Lean.Expr.mdata data body) = Canonical.includeLetType body
- Canonical.includeLetType (Lean.Expr.const declName us) = do let __do_lift ← Lean.getEnv let decl : Lean.ConstantInfo := (__do_lift.find? declName).get! Canonical.isOpaque decl
- Canonical.includeLetType expr = pure false
Instances For
Equations
Instances For
Insert declName into the ToCanonicalM definitions, with the correct type and value.
Translate an Expr into a Typ, by collecting the forallE bindings and app arguments until a head symbol is reached.
When we reach the head symbol, we call toBody with its type and paramArities.
This function is responsible for recursively tranlating the arguments and building the resultant Tm.
When translating from Canonical, we associate names in the Tm with corresponding Lean FVarIds
Instances For
Create n fresh LevelMVars.
Equations
- Canonical.mvarLevels Nat.zero = pure []
- Canonical.mvarLevels n_2.succ = do let fresh ← Lean.mkFreshLMVarId let l ← Canonical.mvarLevels n_2 pure (Lean.mkLevelMVar fresh :: l)
Instances For
Turn instances of Pi wrapper into native forallE.
Lean's default unfolding predicate copied from Lean.Meta.GetUnfoldableConst.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Custom unfolding predicate that unfolds definitions whose body is a forallE.
Equations
- Canonical.canUnfold (body.app arg) = Canonical.canUnfold body
- Canonical.canUnfold (Lean.Expr.lam binderName binderType body binderInfo) = Canonical.canUnfold body
- Canonical.canUnfold (Lean.Expr.letE declName type value body nonDep) = Canonical.canUnfold body
- Canonical.canUnfold (Lean.Expr.mdata data body) = Canonical.canUnfold body
- Canonical.canUnfold (Lean.Expr.forallE binderName binderType body binderInfo) = pure true
- Canonical.canUnfold e = pure false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Canonical.canonicalIO type timeout count synth debug = pure (Canonical.canonical type timeout count synth debug)
Instances For
The widget for the refinement UI.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Canonical exhaustively searches for terms in dependent type theory.
Equations
- One or more equations did not get rendered due to their size.