Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Auto.Embedding.Lam.LamTerm.etaExpand1? (argTy.func a) t = some (Auto.Embedding.Lam.LamTerm.etaExpand1 argTy t)
- Auto.Embedding.Lam.LamTerm.etaExpand1? s t = none
Instances For
This is meant to eta-expand a term t
which has type argTys₀ → ⋯ → argTysᵢ₋₁ → resTy
Equations
- Auto.Embedding.Lam.LamTerm.etaExpandAux argTys t = (Auto.Embedding.Lam.LamTerm.bvarLifts argTys.length t).bvarAppsRev argTys
Instances For
Equations
- wft.etaExpandAux = (⋯.mpr (Auto.Embedding.Lam.LamWF.bvarLifts ⋯ t wft)).bvarAppsRev
Instances For
Equations
Instances For
Equations
- wft.etaExpandWith = wft.etaExpandAux.mkLamFN
Instances For
Equations
Instances For
Equations
- wft.etaExpand = ⋯.mp (⋯.mp wft).etaExpandWith
Instances For
Equations
- wfEx.fromEtaExpand = wfEx.fromEtaExpandWith
Instances For
Equations
- Auto.Embedding.Lam.LamTerm.etaExpandN? n s t = match Auto.Embedding.Lam.LamSort.getArgTysN n s with | some l => some (Auto.Embedding.Lam.LamTerm.etaExpandWith l t) | none => 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.
- t.etaReduce1? = none
Instances For
Equations
- wfl.extensionalizeEqFWith wfr = (wfl.etaExpandAux.mkEq wfr.etaExpandAux).mkForallEFN
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.
- t.extensionalizeEq?F? = 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.
- Auto.Embedding.Lam.LamTerm.extensionalizeEq?FN? n t = 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.
- t.extensionalizeEq = t
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.Embedding.Lam.LamTerm.extensionalizeAux isAppFn (Auto.Embedding.Lam.LamTerm.atom n) = Auto.Embedding.Lam.LamTerm.atom n
- Auto.Embedding.Lam.LamTerm.extensionalizeAux isAppFn (Auto.Embedding.Lam.LamTerm.etom n) = Auto.Embedding.Lam.LamTerm.etom n
- Auto.Embedding.Lam.LamTerm.extensionalizeAux isAppFn (Auto.Embedding.Lam.LamTerm.bvar n) = Auto.Embedding.Lam.LamTerm.bvar n
- Auto.Embedding.Lam.LamTerm.extensionalizeAux isAppFn (Auto.Embedding.Lam.LamTerm.lam s body) = Auto.Embedding.Lam.LamTerm.lam s (Auto.Embedding.Lam.LamTerm.extensionalizeAux false body)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- (Auto.Embedding.Lam.LamWF.ofAtom n).extensionalizeAux = Auto.Embedding.Lam.LamWF.ofAtom n
- (Auto.Embedding.Lam.LamWF.ofEtom n).extensionalizeAux = Auto.Embedding.Lam.LamWF.ofEtom n
- (Auto.Embedding.Lam.LamWF.ofBase b_1).extensionalizeAux = id (Auto.Embedding.Lam.LamWF.ofBase b_1)
- (Auto.Embedding.Lam.LamWF.ofBase b_1).extensionalizeAux = id (Auto.Embedding.Lam.LamWF.ofBase b_1).extensionalizeEq
- (Auto.Embedding.Lam.LamWF.ofBVar n).extensionalizeAux = Auto.Embedding.Lam.LamWF.ofBVar n
- (Auto.Embedding.Lam.LamWF.ofLam bodyTy wfBody).extensionalizeAux = Auto.Embedding.Lam.LamWF.ofLam bodyTy wfBody.extensionalizeAux
- (Auto.Embedding.Lam.LamWF.ofApp argTy wfFn wfArg).extensionalizeAux = id (have wfAp := Auto.Embedding.Lam.LamWF.ofApp argTy wfFn.extensionalizeAux wfArg.extensionalizeAux; wfAp)
Instances For
Equations
- (Auto.Embedding.Lam.LamWF.ofApp s (Auto.Embedding.Lam.LamWF.ofApp s HFn wfl) wfr).intensionalizeEq1 = (Auto.Embedding.Lam.LamWF.ofLam s wfl).mkEq (Auto.Embedding.Lam.LamWF.ofLam s wfr)
Instances For
Equations
- (Auto.Embedding.Lam.LamWF.ofApp (argTy.func s) (Auto.Embedding.Lam.LamWF.ofApp (argTy.func s) HFn wfl) wfr).fromIntensionalizeEq1 = wfl.getLam.mkEq wfr.getLam
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
Suppose we have (λ x. func[body]) arg
and body
is a subterm of func
under idx
levels of binders in func
.
We want to compute what body
will become when we reduce the top-level redex
Suppose lctx ⊢ body : ty
. It's easy to see that the lctx
which arg
resides in is fun n => lctx (n + idx + 1)
and the type of arg
is lctx idx
Equations
- One or more equations did not get rendered due to their size.
- Auto.Embedding.Lam.LamTerm.instantiateAt idx arg (Auto.Embedding.Lam.LamTerm.atom n) = Auto.Embedding.Lam.LamTerm.atom n
- Auto.Embedding.Lam.LamTerm.instantiateAt idx arg (Auto.Embedding.Lam.LamTerm.etom n) = Auto.Embedding.Lam.LamTerm.etom n
- Auto.Embedding.Lam.LamTerm.instantiateAt idx arg (Auto.Embedding.Lam.LamTerm.base a) = Auto.Embedding.Lam.LamTerm.base a
- Auto.Embedding.Lam.LamTerm.instantiateAt idx arg (Auto.Embedding.Lam.LamTerm.bvar n) = Auto.Embedding.pushLCtxAt (Auto.Embedding.Lam.LamTerm.bvarLifts idx arg) idx Auto.Embedding.Lam.LamTerm.bvar n
- Auto.Embedding.Lam.LamTerm.instantiateAt idx arg (Auto.Embedding.Lam.LamTerm.lam s body) = Auto.Embedding.Lam.LamTerm.lam s (Auto.Embedding.Lam.LamTerm.instantiateAt idx.succ arg body)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Embedding.Lam.LamWF.instantiateAt ltv idx x✝¹ x✝ (Auto.Embedding.Lam.LamWF.ofAtom n) = Auto.Embedding.Lam.LamWF.ofAtom n
- Auto.Embedding.Lam.LamWF.instantiateAt ltv idx x✝¹ x✝ (Auto.Embedding.Lam.LamWF.ofEtom n) = Auto.Embedding.Lam.LamWF.ofEtom n
- Auto.Embedding.Lam.LamWF.instantiateAt ltv idx x✝¹ x✝ (Auto.Embedding.Lam.LamWF.ofBase H) = Auto.Embedding.Lam.LamWF.ofBase H
Instances For
Instances For
Equations
Instances For
Equations
- wfArg.instantiate1 wfBody lctx' = Auto.Embedding.Lam.LamWF.instantiate1 lval.toLamTyVal (Auto.Embedding.pushLCtxs lctx lctx') (wfArg lctx') (⋯.mp (wfBody lctx'))
Instances For
Equations
- Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv (Auto.Embedding.Lam.LamBaseTerm.eqI n) = Auto.Embedding.Lam.LamBaseTerm.eq (ltv.lamILTy n)
- Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv (Auto.Embedding.Lam.LamBaseTerm.forallEI n) = Auto.Embedding.Lam.LamBaseTerm.forallE (ltv.lamILTy n)
- Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv (Auto.Embedding.Lam.LamBaseTerm.existEI n) = Auto.Embedding.Lam.LamBaseTerm.existE (ltv.lamILTy n)
- Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv (Auto.Embedding.Lam.LamBaseTerm.iteI n) = Auto.Embedding.Lam.LamBaseTerm.ite (ltv.lamILTy n)
- Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv x✝ = x✝
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.Embedding.Lam.LamTerm.resolveImport ltv (Auto.Embedding.Lam.LamTerm.atom n) = Auto.Embedding.Lam.LamTerm.atom n
- Auto.Embedding.Lam.LamTerm.resolveImport ltv (Auto.Embedding.Lam.LamTerm.etom n) = Auto.Embedding.Lam.LamTerm.etom n
- Auto.Embedding.Lam.LamTerm.resolveImport ltv (Auto.Embedding.Lam.LamTerm.base a) = Auto.Embedding.Lam.LamTerm.base (Auto.Embedding.Lam.LamBaseTerm.resolveImport ltv a)
- Auto.Embedding.Lam.LamTerm.resolveImport ltv (Auto.Embedding.Lam.LamTerm.bvar n) = Auto.Embedding.Lam.LamTerm.bvar n
- Auto.Embedding.Lam.LamTerm.resolveImport ltv (Auto.Embedding.Lam.LamTerm.lam s body) = Auto.Embedding.Lam.LamTerm.lam s (Auto.Embedding.Lam.LamTerm.resolveImport ltv body)
Instances For
Equations
- (Auto.Embedding.Lam.LamWF.ofAtom n).resolveImport = Auto.Embedding.Lam.LamWF.ofAtom n
- (Auto.Embedding.Lam.LamWF.ofEtom n).resolveImport = Auto.Embedding.Lam.LamWF.ofEtom n
- (Auto.Embedding.Lam.LamWF.ofBase b_1).resolveImport = Auto.Embedding.Lam.LamWF.ofBase b_1.resolveImport
- (Auto.Embedding.Lam.LamWF.ofBVar n).resolveImport = Auto.Embedding.Lam.LamWF.ofBVar n
- (Auto.Embedding.Lam.LamWF.ofLam bodyTy wfBody).resolveImport = Auto.Embedding.Lam.LamWF.ofLam bodyTy wfBody.resolveImport
- (Auto.Embedding.Lam.LamWF.ofApp argTy wfFn wfArg).resolveImport = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn.resolveImport wfArg.resolveImport
Instances For
Equations
- wf.resolveImport lctx = (wf lctx).resolveImport
Instances For
Equations
- Auto.Embedding.Lam.LamTerm.topBetaAux s arg (Auto.Embedding.Lam.LamTerm.lam a body) = arg.instantiate1 body
- Auto.Embedding.Lam.LamTerm.topBetaAux s arg x✝ = Auto.Embedding.Lam.LamTerm.app s x✝ arg
Instances For
Equations
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn_2 = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn_2 wfArg
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn_2 = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn_2 wfArg
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn_2 = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn_2 wfArg
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn_2 = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn_2 wfArg
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg_2 (Auto.Embedding.Lam.LamWF.ofLam resTy wfBody) = Auto.Embedding.Lam.LamWF.instantiate1 ltv lctx wfArg_2 wfBody
- Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn_2 = Auto.Embedding.Lam.LamWF.ofApp argTy wfFn_2 wfArg
Instances For
Equations
- ⋯ = ⋯
Instances For
Equations
- (Auto.Embedding.Lam.LamTerm.app s fn arg).topBeta = Auto.Embedding.Lam.LamTerm.topBetaAux s arg fn
- x✝.topBeta = x✝
Instances For
Equations
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.topBeta ltv lctx (Auto.Embedding.Lam.LamWF.ofApp a wfFn wfArg) = Auto.Embedding.Lam.LamWF.topBetaAux ltv lctx wfArg wfFn
Instances For
Equations
- wf.topBeta lctx = Auto.Embedding.Lam.LamWF.topBeta lval.toLamTyVal (Auto.Embedding.pushLCtxs lctx✝ lctx) (wf lctx)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Embedding.Lam.LamWF.ofBeta fn [] wf_2 = wf_2
- Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.atom a) (arg :: args_2) wf_3 = wf_3
- Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.etom a) (arg :: args_2) wf_3 = wf_3
- Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.base a) (arg :: args_2) wf_3 = wf_3
- Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.bvar a) (arg :: args_2) wf_3 = wf_3
- Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.app a a_1 a_2) (arg :: args_2) wf_3 = wf_3
Instances For
Equations
- Auto.Embedding.Lam.LamTerm.headBetaAux x✝ (Auto.Embedding.Lam.LamTerm.app s fn arg) = Auto.Embedding.Lam.LamTerm.headBetaAux ((s, arg) :: x✝) fn
- Auto.Embedding.Lam.LamTerm.headBetaAux x✝¹ x✝ = x✝.beta x✝¹
Instances For
Equations
- wf_2.ofHeadBetaAux = Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.atom a) args wf_2
- wf_2.ofHeadBetaAux = Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.etom a) args wf_2
- wf_2.ofHeadBetaAux = Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.base a) args wf_2
- wf_2.ofHeadBetaAux = Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.bvar a) args wf_2
- wf_2.ofHeadBetaAux = Auto.Embedding.Lam.LamWF.ofBeta (Auto.Embedding.Lam.LamTerm.lam a a_1) args wf_2
- wf_2.ofHeadBetaAux = wf_2.ofHeadBetaAux
Instances For
Instances For
Equations
- Auto.Embedding.Lam.LamTerm.headBetaBounded 0 t = t
- Auto.Embedding.Lam.LamTerm.headBetaBounded n_1.succ t = match t.isHeadBetaTarget with | true => Auto.Embedding.Lam.LamTerm.headBetaBounded n_1 t.headBeta | false => t
Instances For
Equations
- wf.ofHeadBetaBounded = wf
- wf.ofHeadBetaBounded = id (match t.isHeadBetaTarget with | true => wf.ofHeadBeta.ofHeadBetaBounded | false => wf)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Embedding.Lam.LamTerm.betaBounded 0 t = t
- Auto.Embedding.Lam.LamTerm.betaBounded n_1.succ (Auto.Embedding.Lam.LamTerm.atom n) = Auto.Embedding.Lam.LamTerm.atom n
- Auto.Embedding.Lam.LamTerm.betaBounded n_1.succ (Auto.Embedding.Lam.LamTerm.etom n) = Auto.Embedding.Lam.LamTerm.etom n
- Auto.Embedding.Lam.LamTerm.betaBounded n_1.succ (Auto.Embedding.Lam.LamTerm.base a) = Auto.Embedding.Lam.LamTerm.base a
- Auto.Embedding.Lam.LamTerm.betaBounded n_1.succ (Auto.Embedding.Lam.LamTerm.bvar n) = Auto.Embedding.Lam.LamTerm.bvar n
- Auto.Embedding.Lam.LamTerm.betaBounded n_1.succ (Auto.Embedding.Lam.LamTerm.lam s body) = Auto.Embedding.Lam.LamTerm.lam s (Auto.Embedding.Lam.LamTerm.betaBounded n_1 body)
Instances For
Equations
- (Auto.Embedding.Lam.LamTerm.app a fn arg).betaReduced = (!fn.isLam && fn.betaReduced && arg.betaReduced)
- (Auto.Embedding.Lam.LamTerm.lam a body).betaReduced = body.betaReduced
- t.betaReduced = true
Instances For
Equations
Instances For
Equations
Instances For
Equations
- lhs.mpAll rhs t = Auto.Embedding.Lam.LamTerm.rwGenAll (lhs.mpEq? rhs) t
Instances For
Equations
- (Auto.Embedding.Lam.LamTerm.app s fn arg).congrFunN? rwFn 0 = (Auto.Embedding.Lam.LamTerm.app s fn arg).congrFun? rwFn
- (Auto.Embedding.Lam.LamTerm.app s fn arg).congrFunN? rwFn n.succ = (fun (x : Auto.Embedding.Lam.LamTerm) => Auto.Embedding.Lam.LamTerm.app s x arg) <$> fn.congrFunN? rwFn n
- t.congrFunN? rwFn idx = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- t.replace f lvl = match f (Auto.Embedding.Lam.LamTerm.bvarLifts lvl t) with | some t' => Auto.Embedding.Lam.LamTerm.bvarLifts lvl t' | none => t
Instances For
Equations
- t.abstractsRevImp ts = t.abstractsImp ts.reverse
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Embedding.Lam.LamTerm.instantiatesAtImp idx args (Auto.Embedding.Lam.LamTerm.atom n) = Auto.Embedding.Lam.LamTerm.atom n
- Auto.Embedding.Lam.LamTerm.instantiatesAtImp idx args (Auto.Embedding.Lam.LamTerm.etom n) = Auto.Embedding.Lam.LamTerm.etom n
- Auto.Embedding.Lam.LamTerm.instantiatesAtImp idx args (Auto.Embedding.Lam.LamTerm.base a) = Auto.Embedding.Lam.LamTerm.base a
- Auto.Embedding.Lam.LamTerm.instantiatesAtImp idx args (Auto.Embedding.Lam.LamTerm.lam s body) = Auto.Embedding.Lam.LamTerm.lam s (Auto.Embedding.Lam.LamTerm.instantiatesAtImp idx.succ args body)
Instances For
Turn .bvar i
into args[i]
Equations
Instances For
Determine whether a λ term t
(within LamThmValid lval lctx t
) is of the form
LamTerm.mkAppN ((.atom i) <|> (.etom i)) [.bvar iₖ₋₁, ⋯, .bvar i₁, .bvar i₀]
where i₀, i₁, ⋯, iₖ₋₁
is a permutation of 0, 1, 2, ⋯, k - 1
and k
is the length of lctx
. If t
is of the above form, return a list l
of
length k
where ∀ 0 ≤ j < k, l[iⱼ] = j
· This is an auxiliary function for definition unfolding. If we identify
equalities in the input formulas with lhs
or rhs
being general,
for example lhs = LamTerm.mkAppN (.atom i) [.bvar iₖ₋₁, ⋯, .bvar i₁, .bvar i₀]
,
then we can
· First, reorder local context and intensionalize the above equation to
make it look like a definition of .atom i
· Then, exhaustively unfold .atom i
in all input formulas using this definition
· Finally, remove the original equation (i.e. lhs = rhs
) from the set of input formulas
It's easy to see that the above procedure is sound and complete if
rhs
does not contains lhs
.
· Note that the above procedure will not be complete if we relax the iteition
`i₀, i₁, ⋯, iₖ₋₁` is a permutation of `0, 1, 2, ⋯, k - 1`
to
`i₀, i₁, ⋯, iₖ₋₁` is a permutation of a subsequence of `0, 1, 2, ⋯, k - 1`
even if we require that rhs
does not contain lhs
.
To see this, consider the following example with two input formulas:
(Note: #i
is type atom, !i
is term atom, ⟨i⟩
is .bvar i
)
LamThmValid [#0, #0, #0] (!0 ⟨0⟩ ⟨1⟩ = !1 ⟨0⟩ ⟨1⟩ ⟨0⟩ ⟨2⟩)
(lhs is (relaxed) general)LamThmValid [] (!1 !2 !2 !2 !2 = !1 !2 !2 !2 !3)
Equations
- One or more equations did not get rendered due to their size.