Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SnO2WMaN committed Aug 27, 2024
1 parent b08fe65 commit 9865896
Show file tree
Hide file tree
Showing 6 changed files with 480 additions and 20 deletions.
10 changes: 8 additions & 2 deletions Logic/Logic/HilbertStyle/Supplemental.lean
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,14 @@ def negneg_equiv : ๐“ข โŠข ~~p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := by
. exact impTrans'' (andโ‚‚' neg_equiv) (by apply contraโ‚€'; exact andโ‚' neg_equiv)
@[simp] lemma negneg_equiv! : ๐“ข โŠข! ~~p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := โŸจnegneg_equivโŸฉ

def negneg_equiv_dne [HasAxiomDNE ๐“ข] : ๐“ข โŠข p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := iffTrans'' dn negneg_equiv
lemma negneg_equiv_dne! [HasAxiomDNE ๐“ข] : ๐“ข โŠข! p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := โŸจnegneg_equiv_dneโŸฉ
def negneg_equiv'.mp [NegationEquiv ๐“ข] : ๐“ข โŠข ~~p โ†’ ๐“ข โŠข ((p โŸถ โŠฅ) โŸถ โŠฅ) := ฮป h => (andโ‚' negneg_equiv) โจ€ h
def negneg_equiv'.mpr [NegationEquiv ๐“ข] : ๐“ข โŠข ((p โŸถ โŠฅ) โŸถ โŠฅ) โ†’ ๐“ข โŠข ~~p := ฮป h => (andโ‚‚' negneg_equiv) โจ€ h
lemma negneg_equiv'! [HasAxiomDNE ๐“ข] : ๐“ข โŠข! ~~p โ†” ๐“ข โŠข! ((p โŸถ โŠฅ) โŸถ โŠฅ) :=
โŸจฮป โŸจhโŸฉ => โŸจnegneg_equiv'.mp hโŸฉ, ฮป โŸจhโŸฉ => โŸจnegneg_equiv'.mpr hโŸฉโŸฉ

def negneg_equiv_dn [HasAxiomDNE ๐“ข] : ๐“ข โŠข p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := iffTrans'' dn negneg_equiv
lemma negneg_equiv_dn! [HasAxiomDNE ๐“ข] : ๐“ข โŠข! p โŸท ((p โŸถ โŠฅ) โŸถ โŠฅ) := โŸจnegneg_equiv_dnโŸฉ


end NegationEquiv

Expand Down
29 changes: 22 additions & 7 deletions Logic/Modal/Standard/Deduction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ class HasHenkinRule (๐““ : DeductionParameter ฮฑ) where
instance [HasHenkinRule ๐““] : System.HenkinRule ๐““ where
henkin := @ฮป p d => rule (show { antecedents := [โ–กp โŸท p], consequence := p } โˆˆ Rl(๐““) by apply HasHenkinRule.has_henkin; simp_all) (by aesop);

class HasRosserRule (๐““ : DeductionParameter ฮฑ) where
has_rosser : โŸฎRosserโŸฏ โŠ† Rl(๐““) := by aesop

instance [HasRosserRule ๐““] : System.RosserRule ๐““ where
rosser := @ฮป p d => rule (show { antecedents := [~p], consequence := ~(โ–กp) } โˆˆ Rl(๐““) by apply HasRosserRule.has_rosser; simp_all) (by aesop);

class HasRosserBoxRule (๐““ : DeductionParameter ฮฑ) where
has_rosser_box : โŸฎRosserโ–กโŸฏ โŠ† Rl(๐““) := by aesop

instance [HasRosserBoxRule ๐““] : System.RosserBoxRule ๐““ where
rosser_box := @ฮป p d => rule (show { antecedents := [~(โ–กp)], consequence := ~(โ–กโ–กp) } โˆˆ Rl(๐““) by apply HasRosserBoxRule.has_rosser_box; simp_all) (by aesop);

class HasNecOnly (๐““ : DeductionParameter ฮฑ) where
has_necessitation_only : Rl(๐““) = โŸฎNecโŸฏ := by rfl
Expand All @@ -115,6 +126,11 @@ instance [HasAxiomK ๐““] : System.HasAxiomK ๐““ where

class IsNormal (๐““ : DeductionParameter ฮฑ) extends ๐““.HasNecOnly, ๐““.HasAxiomK where

class HasAxiomFour (๐““ : DeductionParameter ฮฑ) where
has_axiomFour : ๐Ÿฐ โŠ† Ax(๐““) := by aesop

instance [HasAxiomFour ๐““] : System.HasAxiomFour ๐““ where
Four _ := maxm (by apply HasAxiomFour.has_axiomFour; simp_all)

end DeductionParameter

Expand Down Expand Up @@ -222,8 +238,7 @@ notation "๐Š๐“๐" => DeductionParameter.KTB

protected abbrev K4 : DeductionParameter ฮฑ := ๐‚๐Ÿฐ
notation "๐Š๐Ÿ’" => DeductionParameter.K4
instance : System.K4 (๐Š๐Ÿ’ : DeductionParameter ฮฑ) where
Four _ := Deduction.maxm $ Set.mem_of_subset_of_mem (by rfl) (by simp)
instance : ๐Š๐Ÿ’.HasAxiomFour (ฮฑ := ฮฑ) where


protected abbrev K5 : DeductionParameter ฮฑ := ๐‚๐Ÿฑ
Expand Down Expand Up @@ -343,23 +358,23 @@ protected abbrev N4 : DeductionParameter ฮฑ where
axioms := ๐Ÿฐ
rules := โŸฎNecโŸฏ
notation "๐๐Ÿ’" => DeductionParameter.N4
instance : HasNecOnly (ฮฑ := ฮฑ) ๐๐Ÿ’ where
instance : System.HasAxiomFour (๐๐Ÿ’ : DeductionParameter ฮฑ) where
Four _ := Deduction.maxm $ Set.mem_of_subset_of_mem (by rfl) (by simp)
instance : ๐๐Ÿ’.HasNecOnly (ฮฑ := ฮฑ) where
instance : ๐๐Ÿ’.HasAxiomFour (ฮฑ := ฮฑ) where

protected abbrev NRosser : DeductionParameter ฮฑ where
axioms := โˆ…
rules := โŸฎNecโŸฏ โˆช โŸฎRosserโŸฏ
notation "๐(๐‘)" => DeductionParameter.NRosser
instance : ๐(๐‘).HasNecessitation (ฮฑ := ฮฑ) where
instance : ๐(๐‘).HasRosserRule (ฮฑ := ฮฑ) where

protected abbrev N4Rosser : DeductionParameter ฮฑ where
axioms := ๐Ÿฐ
rules := โŸฎNecโŸฏ โˆช โŸฎRosserโ–กโŸฏ
notation "๐๐Ÿ’(๐‘)" => DeductionParameter.N4Rosser
instance : ๐๐Ÿ’(๐‘).HasNecessitation (ฮฑ := ฮฑ) where
instance : System.HasAxiomFour (๐๐Ÿ’(๐‘) : DeductionParameter ฮฑ) where
Four _ := Deduction.maxm $ Set.mem_of_subset_of_mem (by rfl) (by simp)
instance : ๐๐Ÿ’(๐‘).HasRosserBoxRule (ฮฑ := ฮฑ) where
instance : ๐๐Ÿ’(๐‘).HasAxiomFour (ฮฑ := ฮฑ) where

end DeductionParameter

Expand Down
Loading

0 comments on commit 9865896

Please sign in to comment.