Flypitch.FOL.Theory packages closed formulas into theories and records the proof-theoretic
and semantic notions attached to them. It also defines consistency, completeness, and the
basic operations for working inside a theory rather than an arbitrary set of formulas.
bounded_term_at t n means that every free variable of t is strictly below n.
Equations
- Flypitch.fol.bounded_term_at (&k) x✝ = (k < x✝)
- Flypitch.fol.bounded_term_at (Flypitch.fol.preterm.func a) x✝ = True
- Flypitch.fol.bounded_term_at (t₁.app t₂) x✝ = (Flypitch.fol.bounded_term_at t₁ x✝ ∧ Flypitch.fol.bounded_term_at t₂ x✝)
Instances For
bounded_formula_at f n means that every free variable of f is strictly below n.
Equations
- Flypitch.fol.bounded_formula_at Flypitch.fol.preformula.falsum x✝ = True
- Flypitch.fol.bounded_formula_at (t₁ ≃ t₂) x✝ = (Flypitch.fol.bounded_term_at t₁ x✝ ∧ Flypitch.fol.bounded_term_at t₂ x✝)
- Flypitch.fol.bounded_formula_at (Flypitch.fol.preformula.rel a) x✝ = True
- Flypitch.fol.bounded_formula_at (f.apprel t) x✝ = (Flypitch.fol.bounded_formula_at f x✝ ∧ Flypitch.fol.bounded_term_at t x✝)
- Flypitch.fol.bounded_formula_at (f₁ ⟹ f₂) x✝ = (Flypitch.fol.bounded_formula_at f₁ x✝ ∧ Flypitch.fol.bounded_formula_at f₂ x✝)
- Flypitch.fol.bounded_formula_at (∀' f) x✝ = Flypitch.fol.bounded_formula_at f (x✝ + 1)
Instances For
Increasing the bound preserves boundedness of terms.
Increasing the bound preserves boundedness of formulas.
Lifting above a bound already respected by a term has no effect.
Lifting above a bound already respected by a formula has no effect.
Substituting at a variable bound already respected by a formula has no effect.
Substituting a closed term into a term bounded by n + 1 lowers the bound to n.
Substituting a closed term into a formula bounded by n + 1 lowers the bound to n.
Lifting above a bound and then substituting the new variable back in cancels for formulas.
Closed formulas, represented as formulas with no free variables.
Equations
Instances For
Equations
- Flypitch.fol.instCoeSentenceFormula = { coe := fun (f : Flypitch.fol.sentence L) => ↑f }
Equations
- Flypitch.fol.«term_⟹__1» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_⟹__1» 62 63 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⟹ ") (Lean.ParserDescr.cat `term 62))
Instances For
Equations
- Flypitch.fol.«term∼__1» = Lean.ParserDescr.node `Flypitch.fol.«term∼__1» 1024 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∼") (Lean.ParserDescr.cat `term 1024))
Instances For
Lifting a closed formula is definitionally irrelevant.
Substituting into a closed formula is definitionally irrelevant.
Equations
- Flypitch.fol.Theory.instMembershipSentence = { mem := fun (T : Flypitch.fol.Theory L) (x : Flypitch.fol.sentence L) => x ∈ T.carrier }
Equations
- Flypitch.fol.Theory.instInsertSentence = { insert := fun (a : Flypitch.fol.sentence L) (T : Flypitch.fol.Theory L) => { carrier := Set.insert a T.carrier } }
Equations
- Flypitch.fol.Theory.instSingletonSentence = { singleton := fun (a : Flypitch.fol.sentence L) => { carrier := {a} } }
Equations
- Flypitch.fol.Theory.instUnion = { union := fun (T T' : Flypitch.fol.Theory L) => { carrier := T.carrier ∪ T'.carrier } }
Equations
- Flypitch.fol.Theory.instCoeSetSentence = { coe := fun (S : Set (Flypitch.fol.sentence L)) => { carrier := S } }
Lifting does nothing on the underlying formulas of a theory of sentences.
Equations
- Flypitch.fol.«term_⊢__1» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_⊢__1» 51 52 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊢ ") (Lean.ParserDescr.cat `term 52))
Instances For
Equations
- Flypitch.fol.«term_⊢'__1» = Lean.ParserDescr.trailingNode `Flypitch.fol.«term_⊢'__1» 51 52 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊢' ") (Lean.ParserDescr.cat `term 52))
Instances For
Any sentence already in the theory is provable from it.
Equations
Instances For
The newest inserted sentence is provable immediately.
Equations
Instances For
The second newest inserted sentence is provable immediately.
Equations
Instances For
Implication elimination internal to theories.
Equations
- Flypitch.fol.simpE A h₁ h₂ = Flypitch.fol.prf.impE (↑A) h₁ h₂
Instances For
Weakening of theory proofs along inclusion of theories.
Equations
- Flypitch.fol.sweakening hsub h = Flypitch.fol.weakening ⋯ h
Instances For
One-step weakening for theory proofs.
Equations
Instances For
Forget that a sentence-level proof came from a theory.
Equations
Instances For
Satisfaction of a sentence in a structure.
Equations
Instances For
Every sentence in T is satisfied in M.
Equations
- Flypitch.fol.all_realize_sentence M T = ∀ ⦃f : Flypitch.fol.sentence L⦄, f ∈ T → Flypitch.fol.realize_sentence M f
Instances For
Satisfaction is monotone along inclusion of theories.
Satisfaction of an inserted sentence splits into the new axiom and the old theory.
Rewriting version of all_realize_sentence_axm.
A singleton theory is satisfied exactly when its unique sentence is.
Extract satisfaction of a particular member of a theory.
Semantic consequence between theories and sentences.
Equations
- Flypitch.fol.ssatisfied T f = ∀ {M : Flypitch.fol.Structure L}, Nonempty M.carrier → Flypitch.fol.all_realize_sentence M T → Flypitch.fol.realize_sentence M f
Instances For
Any sentence already in a theory is a semantic consequence of it.
A theory is consistent when it does not prove falsum.
Equations
Instances For
A complete theory is consistent and decides every sentence.
Equations
- Flypitch.fol.is_complete T = (Flypitch.fol.is_consistent T ∧ ∀ (f : Flypitch.fol.sentence L), f ∈ T ∨ ∼f ∈ T)
Instances For
In a complete theory, every provable sentence is already an axiom.
Truncated version of mem_of_sprf.
In a complete theory, implication can be introduced from a meta-level implication on provability.
In a complete theory, non-provability of f yields provability of ¬f.
Consistent theory extensions ordered by inclusion.
Equations
- Flypitch.fol.TheoryOver T hT = { T' : Flypitch.fol.Theory L // T.Subset T' ∧ Flypitch.fol.is_consistent T' }
Instances For
The base theory regarded as an extension of itself.
Equations
- Flypitch.fol.over_self T hT = ⟨T, ⋯⟩
Instances For
Alias used when completeness is the relevant viewpoint.