Flypitch.FOL.Formula defines formulas over a first-order language together with the
derived connectives, recursors, and the lifting/substitution lemmas used to manage
de Bruijn variables.
Formulas with l relation arguments still to be supplied.
- falsum {L : Language} : preformula L 0
- equal {L : Language} : term L → term L → preformula L 0
- rel {L : Language} {l : ℕ} : L.relations l → preformula L l
- apprel {L : Language} {l : ℕ} : preformula L (l + 1) → term L → preformula L l
- imp {L : Language} : preformula L 0 → preformula L 0 → preformula L 0
- all {L : Language} : preformula L 0 → preformula L 0
Instances For
Closed formulas.
Equations
Instances For
Equations
Equations
- Flypitch.fol.«term_≃_» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_≃_» 88 89 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃ ") (Lean.ParserDescr.cat `term 89))
Instances For
Equations
- Flypitch.fol.«term_⟹_» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_⟹_» 62 63 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⟹ ") (Lean.ParserDescr.cat `term 62))
Instances For
Equations
- Flypitch.fol.«term∀'_» = Lean.ParserDescr.node `Flypitch.fol.«term∀'_» 110 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∀' ") (Lean.ParserDescr.cat `term 110))
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
Derived biconditional.
Equations
- Flypitch.fol.biimp f₁ f₂ = Flypitch.fol.and (f₁ ⟹ f₂) (f₂ ⟹ f₁)
Instances For
Fully apply a relation formula to a tuple of term arguments.
Equations
- Flypitch.fol.apps_rel f Flypitch.dvector.nil = f
- Flypitch.fol.apps_rel f (Flypitch.dvector.cons t ts) = Flypitch.fol.apps_rel (f.apprel t) ts
Instances For
View a relation symbol as an arity'-valued formula constructor.
Equations
Instances For
Recursor for formulas presented as fully applied formulas.
Equations
- One or more equations did not get rendered due to their size.
- Flypitch.fol.formula.rec' hfalsum hequal hrel himp hall (Flypitch.fol.preformula.rel R) x✝ = hrel R x✝
Instances For
Recursor on closed formulas.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility of formula.rec' with apps_rel.
Compatibility of formula.rec with relation application.
Raise every free variable of index at least m in a formula by n.
Equations
- Flypitch.fol.lift_formula_at Flypitch.fol.preformula.falsum x✝¹ x✝ = Flypitch.fol.preformula.falsum
- Flypitch.fol.lift_formula_at (t₁ ≃ t₂) x✝¹ x✝ = (t₁ ↑' x✝¹ # x✝) ≃ t₂ ↑' x✝¹ # x✝
- Flypitch.fol.lift_formula_at (Flypitch.fol.preformula.rel R) x✝¹ x✝ = Flypitch.fol.preformula.rel R
- Flypitch.fol.lift_formula_at (f.apprel t) x✝¹ x✝ = (Flypitch.fol.lift_formula_at f x✝¹ x✝).apprel (t ↑' x✝¹ # x✝)
- Flypitch.fol.lift_formula_at (f₁ ⟹ f₂) x✝¹ x✝ = Flypitch.fol.lift_formula_at f₁ x✝¹ x✝ ⟹ Flypitch.fol.lift_formula_at f₂ x✝¹ x✝
- Flypitch.fol.lift_formula_at (∀' f) x✝¹ x✝ = ∀' Flypitch.fol.lift_formula_at f x✝¹ (x✝ + 1)
Instances For
Lift every free variable in a formula by n.
Equations
- Flypitch.fol.lift_formula x✝¹ x✝ = Flypitch.fol.lift_formula_at x✝¹ x✝ 0
Instances For
Lift every free variable in a formula by one.
Equations
Instances For
lift_formula is lift_formula_at specialized to m = 0.
Lifting by zero leaves a formula unchanged.
Lifting commutes with relation application.
Substitute a term for variable n throughout a formula.
Equations
- Flypitch.fol.subst_formula Flypitch.fol.preformula.falsum x✝¹ x✝ = Flypitch.fol.preformula.falsum
- Flypitch.fol.subst_formula (t₁ ≃ t₂) x✝¹ x✝ = t₁[x✝¹ // x✝] ≃ t₂[x✝¹ // x✝]
- Flypitch.fol.subst_formula (Flypitch.fol.preformula.rel R) x✝¹ x✝ = Flypitch.fol.preformula.rel R
- Flypitch.fol.subst_formula (f.apprel t) x✝¹ x✝ = (Flypitch.fol.subst_formula f x✝¹ x✝).apprel (t[x✝¹ // x✝])
- Flypitch.fol.subst_formula (f₁ ⟹ f₂) x✝¹ x✝ = Flypitch.fol.subst_formula f₁ x✝¹ x✝ ⟹ Flypitch.fol.subst_formula f₂ x✝¹ x✝
- Flypitch.fol.subst_formula (∀' f) x✝¹ x✝ = ∀' Flypitch.fol.subst_formula f x✝¹ (x✝ + 1)
Instances For
Substitution commutes with relation application.
Commute two lifts when the second cutoff is no larger than the first.
A single lift can be moved past another lift by adjusting the cutoff.
Substituting above the lift cutoff commutes with lifting.
Global lifting commutes with substitution above the lifted block.
Commuting version of lift_subst_formula_large with the indices swapped.
Substituting inside the lifted block lowers the lift amount by one.
Lifting once and substituting at the cutoff cancels out.
Substituting below the lift cutoff commutes with lifting the substituted term.
Special case of lift_at_subst_formula_small at variable 0.
Composition law for two substitutions into a formula.
Specialization of subst_formula2 with the first substitution at variable 0.
Count the number of quantifiers appearing in a formula.
Equations
- Flypitch.fol.count_quantifiers Flypitch.fol.preformula.falsum = 0
- Flypitch.fol.count_quantifiers (a ≃ a_1) = 0
- Flypitch.fol.count_quantifiers (Flypitch.fol.preformula.rel a) = 0
- Flypitch.fol.count_quantifiers (a.apprel a_1) = 0
- Flypitch.fol.count_quantifiers (f₁ ⟹ f₂) = Flypitch.fol.count_quantifiers f₁ + Flypitch.fol.count_quantifiers f₂
- Flypitch.fol.count_quantifiers (∀' f) = Flypitch.fol.count_quantifiers f + 1
Instances For
Predicate asserting that a formula contains no quantifiers.