Flypitch.FOL.Syntax defines first-order languages, terms, and the de Bruijn-style lifting
and substitution operations on them. The lemmas in this file are the basic bookkeeping tools
used throughout the later semantic and proof-theoretic developments.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Closed terms.
Equations
Instances For
Equations
- Flypitch.fol.«term&_» = Lean.ParserDescr.node `Flypitch.fol.«term&_» 1024 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "&") (Lean.ParserDescr.cat `term 1024))
Instances For
Fully apply a partially applied term to a tuple of arguments.
Equations
- Flypitch.fol.apps t Flypitch.dvector.nil = t
- Flypitch.fol.apps t (Flypitch.dvector.cons x_3 xs) = Flypitch.fol.apps (t.app x_3) xs
Instances For
noncomputable def
Flypitch.fol.term.rec
{L : Language}
{C : term L → Sort v}
(hvar : (k : ℕ) → C &k)
(hfunc :
{l : ℕ} →
(f : L.functions l) →
(ts : dvector (term L) l) → ((t : term L) → dvector.pmem t ts → C t) → C (apps (preterm.func f) ts))
(t : term L)
:
C t
Dependent recursor on terms that exposes the full argument vector of each function symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Flypitch.fol.term.elim'
{L : Language}
{C : Type v}
(hvar : ℕ → C)
(hfunc : {l : ℕ} → L.functions l → dvector (term L) l → dvector C l → C)
{l : ℕ}
(_t : preterm L l)
(_ts : dvector (term L) l)
(_ih_ts : dvector C l)
:
C
Non-dependent eliminator on partially applied terms with accumulated recursive results.
Equations
- One or more equations did not get rendered due to their size.
- Flypitch.fol.term.elim' hvar hfunc (&k) x_4 x_5 = hvar k
- Flypitch.fol.term.elim' hvar hfunc (Flypitch.fol.preterm.func f) x✝¹ x✝ = hfunc f x✝¹ x✝
Instances For
def
Flypitch.fol.term.elim
{L : Language}
{C : Type v}
(hvar : ℕ → C)
(hfunc : {l : ℕ} → L.functions l → dvector (term L) l → dvector C l → C)
(_t : term L)
:
C
Non-dependent eliminator on closed terms.
Equations
- Flypitch.fol.term.elim hvar hfunc t = Flypitch.fol.term.elim' hvar (fun {l : ℕ} => hfunc) t Flypitch.dvector.nil Flypitch.dvector.nil
Instances For
theorem
Flypitch.fol.term.elim'_apps
{L : Language}
{C : Type v}
(hvar : ℕ → C)
(hfunc : {l : ℕ} → L.functions l → dvector (term L) l → dvector C l → C)
{l : ℕ}
(t : preterm L l)
(ts : dvector (term L) l)
:
elim' hvar (fun {l : ℕ} => hfunc) (apps t ts) dvector.nil dvector.nil = elim' hvar (fun {l : ℕ} => hfunc) t ts (dvector.map (elim hvar fun {l : ℕ} => hfunc) ts)
Compatibility of term.elim' with apps.
theorem
Flypitch.fol.term.elim_apps
{L : Language}
{C : Type v}
(hvar : ℕ → C)
(hfunc : {l : ℕ} → L.functions l → dvector (term L) l → dvector C l → C)
{l : ℕ}
(f : L.functions l)
(ts : dvector (term L) l)
:
elim hvar (fun {l : ℕ} => hfunc) (apps (preterm.func f) ts) = hfunc f ts (dvector.map (elim hvar fun {l : ℕ} => hfunc) ts)
Compatibility of term.elim with function application.
@[simp]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Flypitch.fol.«term_↑_» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_↑_» 100 101 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ↑ ") (Lean.ParserDescr.cat `term 101))
Instances For
Substitute s for variable n, lowering higher variables by one.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.