Documentation

Trestle.Model.Subst

Substitution #

This file defines operations on [PropForm] and [PropFun] for substituting the variables in a formula with other variables, or in general with other formulas.

The main definitions are:

subst #

def Trestle.Model.PropAssignment.subst {ν : Type u_1} {ν' : Type u_2} (f : νPropFun ν') (τ : PropAssignment ν') :
Equations
Instances For

    PropForm #

    @[reducible]
    def Trestle.Model.PropForm.subst {ν₁ : Type u_1} {ν₂ : Type u_2} (p : PropForm ν₁) (f : ν₁PropForm ν₂) :
    PropForm ν₂
    Equations
    Instances For
      theorem Trestle.Model.PropForm.subst_assoc {ν₁ : Type u_3} {ν₂ : Type u_2} {ν₃ : Type u_1} (f₁ : ν₁PropForm ν₂) (f₂ : ν₂PropForm ν₃) (φ : PropForm ν₁) :
      (φ.subst f₁).subst f₂ = φ.subst fun (v : ν₁) => (f₁ v).subst f₂
      @[simp]
      theorem Trestle.Model.PropForm.vars_subst {ν₁ : Type u_1} {ν₂ : Type u_2} (f : ν₁PropForm ν₂) (φ : PropForm ν₁) [DecidableEq ν₁] [DecidableEq ν₂] :
      (φ.subst f).vars = φ.vars.biUnion fun (v1 : ν₁) => (f v1).vars
      @[simp]
      theorem Trestle.Model.PropForm.satisfies_subst {ν₁ : Type u_1} {ν₂ : Type u_2} {φ : PropForm ν₁} {f : ν₁PropForm ν₂} {τ : PropAssignment ν₂} :
      τ φ.subst f PropAssignment.subst (fun (x : ν₁) => f x) τ φ
      theorem Trestle.Model.PropForm.subst_congr {ν₁ : Type u_1} {ν₂ : Type u_2} {φ₁ φ₂ : PropForm ν₁} ( : φ₁ = φ₂) (σ : ν₁PropForm ν₂) :
      φ₁.subst σ = φ₂.subst σ

      substOne #

      def Trestle.Model.PropForm.substOne {ν : Type u_1} [DecidableEq ν] (φ : PropForm ν) (v : ν) (ψ : PropForm ν) :
      Equations
      Instances For
        theorem Trestle.Model.PropForm.satisfies_substOne {ν : Type u_1} [DecidableEq ν] (ψ : PropForm ν) {φ : PropForm ν} {v : ν} {τ : PropAssignment ν} :
        τ φ.substOne v ψ τ.set v (decide (τ ψ)) φ
        theorem Trestle.Model.PropForm.substOne_congr {ν : Type u_1} [DecidableEq ν] {φ₁ φ₂ ψ₁ ψ₂ : PropForm ν} (v : ν) ( : φ₁ = φ₂) ( : ψ₁ = ψ₂) :
        φ₁.substOne v ψ₁ = φ₂.substOne v ψ₂
        theorem Trestle.Model.PropForm.vars_substOne {ν : Type u_1} [DecidableEq ν] (φ : PropForm ν) (v : ν) (ψ : PropForm ν) :
        (φ.substOne v ψ).vars φ.vars \ {v} ψ.vars

        PropFun #

        def Trestle.Model.PropFun.substL {ν₁ : Type u_1} {ν₂ : Type u_2} (φ : PropFun ν₁) (f : ν₁PropForm ν₂) :
        PropFun ν₂
        Equations
        Instances For
          @[simp]
          theorem Trestle.Model.PropFun.substL_distrib {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropForm ν₂) (v : ν₁) :
          (var v).substL f = f v
          @[simp]
          theorem Trestle.Model.PropFun.substL_bot {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropForm ν₂) :
          @[simp]
          theorem Trestle.Model.PropFun.substL_top {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropForm ν₂) :
          @[simp]
          theorem Trestle.Model.PropFun.substL_disj {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropForm ν₂) (φ₁ φ₂ : PropFun ν₁) :
          (φ₁φ₂).substL f = φ₁.substL fφ₂.substL f
          @[simp]
          theorem Trestle.Model.PropFun.substL_conj {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropForm ν₂) (φ₁ φ₂ : PropFun ν₁) :
          (φ₁φ₂).substL f = φ₁.substL fφ₂.substL f
          @[simp]
          theorem Trestle.Model.PropFun.substL_neg {ν₁ : Type u_1} {ν₂ : Type u_2} (f : ν₁PropForm ν₂) {φ : PropFun ν₁} :
          φ.neg.substL f = (φ.substL f).neg
          @[simp]
          theorem Trestle.Model.PropFun.substL_compl {ν₁ : Type u_1} {ν₂ : Type u_2} (f : ν₁PropForm ν₂) {φ : PropFun ν₁} :
          φ.substL f = (φ.substL f)
          @[simp]
          theorem Trestle.Model.PropFun.satisfies_substL {ν₁ : Type u_1} {ν₂ : Type u_2} {φ : PropFun ν₁} {f : ν₁PropForm ν₂} {τ : PropAssignment ν₂} :
          τ φ.substL f PropAssignment.subst (fun (x : ν₁) => f x) τ φ
          noncomputable def Trestle.Model.PropFun.subst {ν₁ : Type u_1} {ν₂ : Type u_2} (φ : PropFun ν₁) (f : ν₁PropFun ν₂) :
          PropFun ν₂
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem Trestle.Model.PropFun.satisfies_subst {ν₁ : Type u_1} {ν₂ : Type u_2} {φ : PropFun ν₁} {f : ν₁PropFun ν₂} {τ : PropAssignment ν₂} :
            @[simp]
            theorem Trestle.Model.PropFun.subst_distrib {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropFun ν₂) (v : ν₁) :
            @[simp]
            theorem Trestle.Model.PropFun.subst_bot {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropFun ν₂) :
            @[simp]
            theorem Trestle.Model.PropFun.subst_top {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁PropFun ν₂) :
            @[simp]
            theorem Trestle.Model.PropFun.subst_disj {ν₁ : Type u_2} {ν₂ : Type u_1} (φ₁ φ₂ : PropFun ν₁) (f : ν₁PropFun ν₂) :
            (φ₁φ₂).subst f = φ₁.subst fφ₂.subst f
            @[simp]
            theorem Trestle.Model.PropFun.subst_conj {ν₁ : Type u_2} {ν₂ : Type u_1} (φ₁ φ₂ : PropFun ν₁) (f : ν₁PropFun ν₂) :
            (φ₁φ₂).subst f = φ₁.subst fφ₂.subst f
            @[simp]
            theorem Trestle.Model.PropFun.subst_neg {ν₁ : Type u_2} {ν₂ : Type u_1} (φ : PropFun ν₁) (f : ν₁PropFun ν₂) :
            φ.neg.subst f = (φ.subst f).neg
            @[simp]
            theorem Trestle.Model.PropFun.subst_compl {ν₁ : Type u_2} {ν₂ : Type u_1} (φ : PropFun ν₁) (f : ν₁PropFun ν₂) :
            φ.subst f = (φ.subst f)
            theorem Trestle.Model.PropFun.semVars_subst {ν₁ : Type u_1} {ν₂ : Type u_2} [DecidableEq ν₁] [DecidableEq ν₂] {φ : PropFun ν₁} {f : ν₁PropFun ν₂} :
            (φ.subst f).semVars φ.semVars.biUnion fun (v1 : ν₁) => (f v1).semVars
            def Trestle.Model.PropFun.substOne {ν : Type u_1} [DecidableEq ν] (ψ : PropFun ν) (v : ν) (φ : PropFun ν) :
            Equations
            Instances For
              @[simp]
              theorem Trestle.Model.PropFun.satisfies_substOne {ν : Type u_1} [DecidableEq ν] {φ ψ : PropFun ν} {v : ν} {τ : PropAssignment ν} :
              τ ψ.substOne v φ τ.set v (decide (τ φ)) ψ

              map #

              @[simp]
              theorem Trestle.Model.PropForm.vars_map {ν₁ : Type u_1} {ν₂ : Type u_2} (f : ν₁ν₂) (φ : PropForm ν₁) [DecidableEq ν₁] [DecidableEq ν₂] :
              (map f φ).vars = Finset.image f φ.vars
              theorem Trestle.Model.PropForm.satisfies_map {ν₁ : Type u_1} {ν₂ : Type u_2} {φ : PropForm ν₁} {f : ν₁ν₂} {τ : PropAssignment ν₂} :
              τ map f φ PropAssignment.map f τ φ
              @[simp]
              theorem Trestle.Model.PropForm.semVars_map {ν₁ : Type u_1} {ν₂ : Type u_2} [DecidableEq ν₁] [DecidableEq ν₂] [Fintype ν₁] {f : ν₁ν₂} (hf : Function.Injective f) (φ : PropForm ν₁) :
              PropFun.semVars map f φ = Finset.map { toFun := f, inj' := hf } (PropFun.semVars φ)
              def Trestle.Model.PropFun.map {ν₁ : Type u_1} {ν₂ : Type u_2} (f : ν₁ν₂) (φ : PropFun ν₁) :
              PropFun ν₂
              Equations
              Instances For
                @[simp]
                theorem Trestle.Model.PropFun.satisfies_map {ν₁ : Type u_1} {ν₂ : Type u_2} {φ : PropFun ν₁} {f : ν₁ν₂} {τ : PropAssignment ν₂} :
                τ map f φ PropAssignment.map f τ φ
                theorem Trestle.Model.PropFun.semVars_map {ν₁ : Type u_1} {ν₂ : Type u_2} [DecidableEq ν₁] [DecidableEq ν₂] [Fintype ν₁] (f : ν₁ν₂) (φ : PropFun ν₁) (hf : Function.Injective f) :
                (map f φ).semVars = Finset.map { toFun := f, inj' := hf } φ.semVars
                @[simp]
                theorem Trestle.Model.PropFun.map_var {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (v : ν₁) :
                map f (var v) = var (f v)
                @[simp]
                theorem Trestle.Model.PropFun.map_tr {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) :
                @[simp]
                theorem Trestle.Model.PropFun.map_fls {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) :
                @[simp]
                theorem Trestle.Model.PropFun.map_neg {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (φ : PropFun ν₁) :
                map f φ = (map f φ)
                @[simp]
                theorem Trestle.Model.PropFun.map_conj {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (φ₁ φ₂ : PropFun ν₁) :
                map f (φ₁φ₂) = map f φ₁map f φ₂
                @[simp]
                theorem Trestle.Model.PropFun.map_disj {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (φ₁ φ₂ : PropFun ν₁) :
                map f (φ₁φ₂) = map f φ₁map f φ₂
                @[simp]
                theorem Trestle.Model.PropFun.map_impl {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (φ₁ φ₂ : PropFun ν₁) :
                map f (φ₁ φ₂) = map f φ₁ map f φ₂
                @[simp]
                theorem Trestle.Model.PropFun.map_biImpl {ν₁ : Type u_2} {ν₂ : Type u_1} (f : ν₁ν₂) (φ₁ φ₂ : PropFun ν₁) :
                map f ((fun (φ₁ φ₂ : PropFun ν₁) => (φ₁ φ₂) ⊓ (φ₂ φ₁)) φ₁ φ₂) = (fun (φ₁ φ₂ : PropFun ν₂) => (φ₁ φ₂) ⊓ (φ₂ φ₁)) (map f φ₁) (map f φ₂)