Skip to content

Commit

Permalink
idea to define the semEquiv Quotient
Browse files Browse the repository at this point in the history
  • Loading branch information
m4lvin committed Jul 22, 2024
1 parent 453e9ca commit 9d6710f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
25 changes: 25 additions & 0 deletions Pdl/SemQuot.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

import Pdl.Semantics

/-! ## Semantic Quotients -/

#print semEquiv

def semEquiv.Equivalence : Equivalence semEquiv :=
by convert semEquiv.refl
, by convert semEquiv.symm
, by convert semEquiv.trans ⟩
-- (why) are the "by convert" needed here?

instance Formula.instSetoid : Setoid Formula := ⟨semEquiv, semEquiv.Equivalence⟩

-- How should I name this?
abbrev SemProp := Quotient Formula.instSetoid

-- Now, can we lift connectives such as ~ and ⋀ to the quotient?

def SemProp.neg : SemProp → SemProp :=
Quotient.map Formula.neg (by sorry)

def SemProp.and : SemProp → SemProp → SemProp :=
Quotient.map₂ Formula.and (by sorry)
20 changes: 13 additions & 7 deletions Pdl/Semantics.lean
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,19 @@ theorem notsatisfnotThenTaut : ∀ φ, ¬ satisfiable (~φ) → tautology φ :=
theorem subsetSat {M : KripkeModel W} {w : W} {X Y : List Formula} : (∀ φ ∈ X, evaluate M w φ) → Y ⊆ X → ∀ φ ∈ Y, evaluate M w φ :=
by aesop

theorem semEquiv.transitive : Transitive semEquiv :=
by
unfold Transitive
unfold semEquiv
intro f g h f_is_g g_is_h W M w
specialize f_is_g W M w
specialize g_is_h W M w
theorem semEquiv.refl : Reflexive semEquiv := by
tauto

theorem semEquiv.symm : Symmetric semEquiv := by
intro φ1 φ2 hyp
intro W M w
specialize hyp W M w
tauto

theorem semEquiv.trans : Transitive semEquiv := by
intro _ _ _ hyp1 hyp2 W M w
specialize hyp1 W M w
specialize hyp2 W M w
tauto

class vDash (α : Type) (β : Type) where
Expand Down

0 comments on commit 9d6710f

Please sign in to comment.