Documentation

Trestle.Model.PropForm

Propositional formulas #

inductive Trestle.Model.PropForm (ν : Type u) :

A propositional formula over variables of type ν.

This is the inductively defined syntax of formulas. Later on we can take a quotient to identify x ∨ ¬x with , for example.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[reducible, inline, deprecated Trestle.Model.PropForm.all (since := "20 Jan 2025")]
      abbrev Trestle.Model.PropForm.conj' {L : Type u_1} (fs : List (PropForm L)) :
      Equations
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[reducible, inline, deprecated Trestle.Model.PropForm.any (since := "20 Jan 2025")]
          abbrev Trestle.Model.PropForm.disj' {L : Type u_1} (fs : List (PropForm L)) :
          Equations
          Instances For

            Satisfying assignments #

            An assignment satisfies a formula φ when φ evaluates to at that assignment.

            Equations
            Instances For

              This instance is scoped so that τ ⊨ φ : Prop implies φ : PropForm _ via the outParam only when PropForm is open.

              Equations
              Instances For
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_var {ν : Type u_1} {τ : PropAssignment ν} {x : ν} :
                τ var x τ x = true
                @[simp]
                @[simp]
                theorem Trestle.Model.PropForm.not_satisfies_fls {ν : Type u_1} {τ : PropAssignment ν} :
                (fun (M : PropAssignment ν) (φ : PropForm ν) => ¬M φ) τ fls
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_neg {ν : Type u_1} {τ : PropAssignment ν} {φ : PropForm ν} :
                τ φ.neg (fun (M : PropAssignment ν) (φ : PropForm ν) => ¬M φ) τ φ
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_conj {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.conj φ₂ τ φ₁ τ φ₂
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_disj {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.disj φ₂ τ φ₁ τ φ₂
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_impl {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.impl φ₂ τ φ₁τ φ₂
                theorem Trestle.Model.PropForm.satisfies_impl' {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.impl φ₂ (fun (M : PropAssignment ν) (φ : PropForm ν) => ¬M φ) τ φ₁ τ φ₂
                @[simp]
                theorem Trestle.Model.PropForm.satisfies_biImpl {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.biImpl φ₂ (τ φ₁ τ φ₂)
                theorem Trestle.Model.PropForm.satisfies_biImpl' {ν : Type u_1} {τ : PropAssignment ν} {φ₁ φ₂ : PropForm ν} :
                τ φ₁.biImpl φ₂ τ φ₁ τ φ₂ (fun (M : PropAssignment ν) (φ : PropForm ν) => ¬M φ) τ φ₁ (fun (M : PropAssignment ν) (φ : PropForm ν) => ¬M φ) τ φ₂

                Semantic entailment and equivalence #

                def Trestle.Model.PropForm.entails {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :

                A formula φ₁ semantically entails φ₂ when τ ⊨ φ₁ implies τ ⊨ φ₂.

                This is actually defined in terms of the Boolean lattice to reuse various le_blah theorems, and the above statement is a theorem (entails_ext).

                Equations
                Instances For
                  theorem Trestle.Model.PropForm.entails_ext {ν : Type u_1} {φ₁ φ₂ : PropForm ν} :
                  φ₁.entails φ₂ ∀ (τ : PropAssignment ν), τ φ₁τ φ₂

                  An equivalent formulation of semantic entailment in terms of satisfying assignments.

                  theorem Trestle.Model.PropForm.entails.trans {ν : Type u_1} {φ₁ φ₂ φ₃ : PropForm ν} :
                  φ₁.entails φ₂φ₂.entails φ₃φ₁.entails φ₃
                  theorem Trestle.Model.PropForm.entails_disj_left {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :
                  φ₁.entails (φ₁.disj φ₂)
                  theorem Trestle.Model.PropForm.entails_disj_right {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :
                  φ₂.entails (φ₁.disj φ₂)
                  theorem Trestle.Model.PropForm.disj_entails {ν : Type u_1} {φ₁ φ₂ φ₃ : PropForm ν} :
                  φ₁.entails φ₃φ₂.entails φ₃(φ₁.disj φ₂).entails φ₃
                  theorem Trestle.Model.PropForm.conj_entails_left {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :
                  (φ₁.conj φ₂).entails φ₁
                  theorem Trestle.Model.PropForm.conj_entails_right {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :
                  (φ₁.conj φ₂).entails φ₂
                  theorem Trestle.Model.PropForm.entails_conj {ν : Type u_1} {φ₁ φ₂ φ₃ : PropForm ν} :
                  φ₁.entails φ₂φ₁.entails φ₃φ₁.entails (φ₂.conj φ₃)
                  theorem Trestle.Model.PropForm.entails_disj_conj {ν : Type u_1} (φ₁ φ₂ φ₃ : PropForm ν) :
                  ((φ₁.disj φ₂).conj (φ₁.disj φ₃)).entails (φ₁.disj (φ₂.conj φ₃))
                  def Trestle.Model.PropForm.equivalent {ν : Type u_1} (φ₁ φ₂ : PropForm ν) :

                  Two formulas are semantically equivalent when they always evaluate to the same thing.

                  This is a strong notion of equivalence. See equivalentOver for a weaker one.

                  Equations
                  Instances For
                    theorem Trestle.Model.PropForm.equivalent_iff_entails {ν : Type u_1} {φ₁ φ₂ : PropForm ν} :
                    φ₁.equivalent φ₂ φ₁.entails φ₂ φ₂.entails φ₁
                    theorem Trestle.Model.PropForm.equivalent_ext {ν : Type u_1} {φ₁ φ₂ : PropForm ν} :
                    φ₁.equivalent φ₂ ∀ (τ : PropAssignment ν), τ φ₁ τ φ₂
                    theorem Trestle.Model.PropForm.equivalent.symm {ν : Type u_1} {φ₁ φ₂ : PropForm ν} :
                    φ₁.equivalent φ₂φ₂.equivalent φ₁
                    theorem Trestle.Model.PropForm.equivalent.trans {ν : Type u_1} {φ₁ φ₂ φ₃ : PropForm ν} :
                    φ₁.equivalent φ₂φ₂.equivalent φ₃φ₁.equivalent φ₃
                    theorem Trestle.Model.PropForm.equivalent.antisymm {ν : Type u_1} {φ₁ φ₂ : PropForm ν} :
                    φ₁.entails φ₂φ₂.entails φ₁φ₁.equivalent φ₂

                    Define notation for PropForms #

                    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