We require that all instances of polymorphic constants,
including ∀
, ∃
, BitVec
, are turned into free variables
before being sent to LamReif.
Since propositional
implication →
has the same representation as ∀
in Lean Expr
,
we also require that they are turned into free variables.
In this way, the expression that LamReif
receives is an
essentially higher-order term that can be reified directly.
- tyVarMap : Std.HashMap Lean.Expr Nat
- varMap : Std.HashMap Lean.Expr Nat
- tyVal : Array (Lean.Expr × Lean.Level)
- varVal : Array (Lean.Expr × Embedding.Lam.LamSort)
- lamILTy : Array Embedding.Lam.LamSort
- isomTyMap : Std.HashMap Embedding.Lam.LamSort Nat
- assertions : Std.HashMap Embedding.Lam.LamTerm (Lean.Expr × DTr × Embedding.Lam.LamTerm × Nat)
- inhabitations : Std.HashMap Embedding.Lam.LamSort (Lean.Expr × DTr × Nat)
- chkStepCache : Std.HashMap Embedding.Lam.ChkStep (Embedding.Lam.EvalResult × Array Nat)
- etomChkStep : Std.HashMap Nat Embedding.Lam.ChkStep
- u : Lean.Level
Instances For
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.getLamILTy = do let st ← get pure st.lamILTy
Instances For
Equations
- Auto.LamReif.getAssertions = do let st ← get pure st.assertions
Instances For
Equations
- Auto.LamReif.getIsomTyMap = do let st ← get pure st.isomTyMap
Instances For
Equations
- Auto.LamReif.getInhabitations = do let st ← get pure st.inhabitations
Instances For
Equations
- Auto.LamReif.getTyVarMap = do let st ← get pure st.tyVarMap
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.getChkStepCache = do let st ← get pure st.chkStepCache
Instances For
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
Equations
- Auto.LamReif.getVarMap = do let st ← get pure st.varMap
Instances For
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
Equations
- Auto.LamReif.getVarVal = do let st ← get pure st.varVal
Instances For
Equations
- Auto.LamReif.getU = do let st ← get pure st.u
Instances For
Equations
- Auto.LamReif.getRst = do let st ← get pure st.rst
Instances For
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
Equations
- Auto.LamReif.getTyVal = do let st ← get pure st.tyVal
Instances For
Equations
- Auto.LamReif.getEtomChkStep = do let st ← get pure st.etomChkStep
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.getRTable = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.rTable
Instances For
Equations
- Auto.LamReif.getRTableTree = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.rTableTree
Instances For
Equations
- Auto.LamReif.getMaxEVarSucc = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.maxEVarSucc
Instances For
Equations
- Auto.LamReif.getLamEVarTy = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.lamEVarTy
Instances For
Equations
- Auto.LamReif.getLamEVarTyTree = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.lamEVarTyTree
Instances For
Equations
- Auto.LamReif.getChkMap = do let __do_lift ← Auto.LamReif.getRst pure __do_lift.chkMap
Instances For
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Lookup valuation of term atom
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
- chkStep : Embedding.Lam.ChkStep → REntryProof
- inhabitation : Lean.Expr → DTr → Embedding.Lam.LamSort → REntryProof
- assertion : Lean.Expr → DTr → Embedding.Lam.LamTerm → REntryProof
Instances For
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
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
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
This should only be used at the meta level, i.e. in code that will
be evaluated during the execution of auto
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.resolveLamBaseTermImport (Auto.Embedding.Lam.LamBaseTerm.eqI n) = do let __do_lift ← Auto.LamReif.lookupLamILTy! n pure (Auto.Embedding.Lam.LamBaseTerm.eq __do_lift)
- Auto.LamReif.resolveLamBaseTermImport (Auto.Embedding.Lam.LamBaseTerm.forallEI n) = do let __do_lift ← Auto.LamReif.lookupLamILTy! n pure (Auto.Embedding.Lam.LamBaseTerm.forallE __do_lift)
- Auto.LamReif.resolveLamBaseTermImport (Auto.Embedding.Lam.LamBaseTerm.existEI n) = do let __do_lift ← Auto.LamReif.lookupLamILTy! n pure (Auto.Embedding.Lam.LamBaseTerm.existE __do_lift)
- Auto.LamReif.resolveLamBaseTermImport (Auto.Embedding.Lam.LamBaseTerm.iteI n) = do let __do_lift ← Auto.LamReif.lookupLamILTy! n pure (Auto.Embedding.Lam.LamBaseTerm.ite __do_lift)
- Auto.LamReif.resolveLamBaseTermImport x✝ = pure x✝
Instances For
Models resolveImport
on the meta
level
Equations
- One or more equations did not get rendered due to their size.
- Auto.LamReif.resolveImport (Auto.Embedding.Lam.LamTerm.atom n) = pure (Auto.Embedding.Lam.LamTerm.atom n)
- Auto.LamReif.resolveImport (Auto.Embedding.Lam.LamTerm.base b) = do let __do_lift ← Auto.LamReif.resolveLamBaseTermImport b pure (Auto.Embedding.Lam.LamTerm.base __do_lift)
- Auto.LamReif.resolveImport (Auto.Embedding.Lam.LamTerm.bvar n) = pure (Auto.Embedding.Lam.LamTerm.bvar n)
- Auto.LamReif.resolveImport (Auto.Embedding.Lam.LamTerm.lam s t) = do let __do_lift ← Auto.LamReif.resolveImport t pure (Auto.Embedding.Lam.LamTerm.lam s __do_lift)
Instances For
This is the inverse of resolveImport
· When importing external proof H : α
, we will reify α
into t : LamTerm
using reifTerm
. The t
returned
by reifTerm
has eq
for Eq
, forallE
for ∀
,
existE
for ∃
and ite
for Auto.Bool.ite'
· It's easy to see that t.interp
will not be definitionally
equal to α
because =, ∀, ∃, ite'
within α
operates on the
original domain, while =, ∀, ∃, ite'
in t.interp
operates on
the lifted domain
· Therefore, we need to turn =, ∀, ∃, ite'
in t
into import
version to get t'
, and design an appropriate ilVal
,
such that GLift.down t'.interp
is definitionally equal to α
Equations
- One or more equations did not get rendered due to their size.
- Auto.LamReif.mkImportVersion (Auto.Embedding.Lam.LamTerm.atom n) = pure (Auto.Embedding.Lam.LamTerm.atom n)
- Auto.LamReif.mkImportVersion (Auto.Embedding.Lam.LamTerm.base b) = pure (Auto.Embedding.Lam.LamTerm.base b)
- Auto.LamReif.mkImportVersion (Auto.Embedding.Lam.LamTerm.bvar n) = pure (Auto.Embedding.Lam.LamTerm.bvar n)
- Auto.LamReif.mkImportVersion (Auto.Embedding.Lam.LamTerm.lam s t) = do let __do_lift ← Auto.LamReif.mkImportVersion t pure (Auto.Embedding.Lam.LamTerm.lam s __do_lift)
Instances For
A new ChkStep
. res
is the expected result of the ChkStep
Returns:
- Whether the checkstep produces a new REntry
- The
EvalResult
of this checkstep
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the position of the entry inside the RTable
Equations
- One or more equations did not get rendered due to their size.
Instances For
ty
is a reified assumption. ∀, ∃
and =
in ty
are supposed to
not be of the import version
The type of proof
is definitionally equal to GLift.down (← mkImportVersion ty).interp
Returns the position of ty
inside the validTable
after inserting it
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns false
if s
is subsumed by previous inhabited sorts
Returns true
if not
Equations
- One or more equations did not get rendered due to their size.
Instances For
The type of inh
should be definitionally equal to s.interpAsUnlifted
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
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
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
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
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
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
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.
- Auto.LamReif.validOfBetaReduce (Auto.Embedding.Lam.REntry.valid a t) = Auto.LamReif.validOfBetaBounded (Auto.Embedding.Lam.REntry.valid a t) t.betaReduceHackyIdx
Instances For
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
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
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
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
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
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given ∀ (_ : s₀) (_ : s₁) ⋯ (_ : sₖ₋₁), body
and the fact
that s₀, s₁, ⋯, sₖ₋₁
are nonempty, return a proof of body
Equations
- Auto.LamReif.validOfElimForalls v ns = do let introed ← Auto.LamReif.validOfIntros v ns.size Auto.LamReif.validOfBVarLowers introed ns.reverse
Instances For
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
Repeated instantiation
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
Given ∀ x₀ x₁ ⋯ xₖ₋₁, p
and arg₀, arg₁, ⋯, argₖ₋₁
, return
p[x₀/arg₀, x₁/arg₁, ⋯, xₖ₋₁/argₖ₋₁]
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exhaustively decompose ∧
at position occ
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
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
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
.bvar i
will be turned into .bvar map[i]
It is required that the size of rmap
is equal to the length of local context
Equations
- One or more equations did not get rendered due to their size.
Instances For
Refer to docstring of LamTerm.isGeneral
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recognize all definitions-like facts within vs
, exhaustively
rewrite using them and remove them in the end
Meanwhile, all λterms in the ts
are rewritten using the
recognied definitions
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Accept a new expression representing λterm atom
Returns the index of it in the varVal
array
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.reifType e = do let e ← liftM (Auto.prepReduceTypeForall e) Auto.LamReif.reifTypeAux✝ e
Instances For
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.LamReif.reifMapBVConst3 = Std.HashMap.ofList [(`BitVec.extractLsb, fun (n h l : Nat) => Auto.Embedding.Lam.LamTerm.base (Auto.Embedding.Lam.LamBaseTerm.bvextract n h l))]
Instances For
Equations
- Auto.LamReif.reifMapAttributesProp = Std.HashMap.ofList [(`Auto.SMT.Attribute.trigger, "pattern")]
Instances For
Equations
Instances For
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
fn : .const _ _ arg₁ : .const _ _
Equations
- One or more equations did not get rendered due to their size.
Instances For
fn : .const _ _ arg₁ : .app (.const _ _) natlit
Equations
- One or more equations did not get rendered due to their size.
Instances For
fn : .const _ _ arg₁ : .const _ _ arg₂ : .const _ _
Equations
- One or more equations did not get rendered due to their size.
Instances For
fn : .const _ _ arg₁ : .app (.const _ _) natlit₁ arg₂ : .app (.const _ _) natlit₂ |- natlit₁ = natlit₂
Equations
- One or more equations did not get rendered due to their size.
Instances For
fn : .const _ _ arg₁ : .app (.const _ _) natlit₁ arg₂ : .app (.const _ _) natlit₂ |- natlit₁ ?? natlit₂
Equations
- One or more equations did not get rendered due to their size.
Instances For
fn : .const _ _ arg₁ : .app (.const _ _) natlit arg₂ : .const _ _
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.
- Auto.LamReif.processLam0Arg2 e fn arg₁ arg₂ = pure none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.LamReif.processLam0Arg3 e (Lean.Expr.const `OfNat.ofNat us) arg₁ arg₂ arg₃ = pure none
- Auto.LamReif.processLam0Arg3 e fn arg₁ arg₂ arg₃ = pure none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.LamReif.processLam0Arg4 e fn arg₁ arg₂ arg₃ arg₄ = pure none
Instances For
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
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
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Return the positions of the reified and resolveImport
-ed facts within the validTable
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
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
re
is the entry we want to retrieve from the validTable
The expr
returned is a proof of the LamThmValid
-ness of the entry
Equations
- One or more equations did not get rendered due to their size.
Instances For
re
is the entry we want to retrieve from the validTable
The expr
returned is a proof of the LamThmValid
-ness of the entry
Equations
- One or more equations did not get rendered due to their size.
Instances For
This can be used to shows the issue that compilation of a reduced
expression exhibits superlinear behaviour. Try the examples in
Test/CheckerScalability/Skolemization.lean
This function is not intended to be called in practice
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
- typeH2lMap : Std.HashMap Nat Nat
- termH2lMap : Std.HashMap Nat Nat
- etomH2lMap : Std.HashMap Nat Nat
- etomL2hMap : Std.HashMap Nat Nat
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Auto.Lam2Lam.instInhabitedTransM = { default := fun (x : ST.Ref IO.RealWorld Auto.Lam2Lam.TState) => throw default }
Equations
- Auto.Lam2Lam.getTypeH2lMap = do let st ← get pure st.typeH2lMap
Instances For
Equations
- Auto.Lam2Lam.getEtomH2lMap = do let st ← get pure st.etomH2lMap
Instances For
Equations
- Auto.Lam2Lam.getCsH2lMap = do let st ← get pure st.csH2lMap
Instances For
Equations
- Auto.Lam2Lam.getTermH2lMap = do let st ← get pure st.termH2lMap
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Lam2Lam.getTypeL2hMap = do let st ← get pure st.typeL2hMap
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Lam2Lam.getTermL2hMap = do let st ← get pure st.termL2hMap
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Lam2Lam.getEtomL2hMap = do let st ← get pure st.etomL2hMap
Instances For
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
When translating Lam
to Lam
in Lam2Lam
, make sure that
the LamSort
in this val
is already translated.
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
Equations
- One or more equations did not get rendered due to their size.
- Auto.Lam2Lam.transLamSort ref (Auto.Embedding.Lam.LamSort.base b) = pure (Auto.Embedding.Lam.LamSort.base b)
- Auto.Lam2Lam.transLamSort ref (s₁.func s₂) = Auto.Embedding.Lam.LamSort.func <$> Auto.Lam2Lam.transLamSort ref s₁ <*> Auto.Lam2Lam.transLamSort ref s₂
Instances For
Equations
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.eqI a) = Lean.throwError ((Lean.MessageData.ofFormat ∘ Std.format) Auto.Lam2Lam.transLamBaseTermILErr✝)
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.forallEI a) = Lean.throwError ((Lean.MessageData.ofFormat ∘ Std.format) Auto.Lam2Lam.transLamBaseTermILErr✝)
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.existEI a) = Lean.throwError ((Lean.MessageData.ofFormat ∘ Std.format) Auto.Lam2Lam.transLamBaseTermILErr✝)
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.iteI a) = Lean.throwError ((Lean.MessageData.ofFormat ∘ Std.format) Auto.Lam2Lam.transLamBaseTermILErr✝)
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.eq s) = Auto.Embedding.Lam.LamBaseTerm.eq <$> Auto.Lam2Lam.transLamSort ref s
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.forallE s) = Auto.Embedding.Lam.LamBaseTerm.forallE <$> Auto.Lam2Lam.transLamSort ref s
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.existE s) = Auto.Embedding.Lam.LamBaseTerm.existE <$> Auto.Lam2Lam.transLamSort ref s
- Auto.Lam2Lam.transLamBaseTerm ref (Auto.Embedding.Lam.LamBaseTerm.ite s) = Auto.Embedding.Lam.LamBaseTerm.ite <$> Auto.Lam2Lam.transLamSort ref s
- Auto.Lam2Lam.transLamBaseTerm ref x✝ = pure x✝
Instances For
Delete irrelevant Valuations and ChkSteps, but make sure that
entries in res
are still provable
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build optimized checker = Optimize state + Build full checker
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decide whether to optimize based on option
Equations
- One or more equations did not get rendered due to their size.