Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

コード例: 直観主義論理において,de morgan と弱い排中律が同値であること #232

Closed
Seasawher opened this issue Jun 13, 2024 · 0 comments
Labels
メモ 解決済みにすることを目指さず、残しておくもの

Comments

@Seasawher
Copy link
Member

def de_morgan := ∀ (p q : Prop), ¬(p ∧ q) → (¬p) ∨ (¬q)
  
def weak_em := ∀ (p : Prop), ¬ p ∨ ¬ ¬ p

theorem currying (p q : Prop) : ¬ (p ∧ q) ↔ (p → ¬ q) := by 
  constructor
  
  case mp =>
    intro h hp hq
    have : p ∧ q := ⟨hp, hq⟩
    contradiction

  case mpr =>
    intro h hand
    obtain ⟨hp, hq⟩ := hand
    have := h hp
    contradiction


theorem de_morgan_iff_weak_em : de_morgan ↔ weak_em := by
  constructor

  case mp =>
    intro h p
    have := h p
    apply this
    intro nand
    obtain ⟨hp, hnp⟩ := nand
    apply hnp
    assumption

  case mpr =>
    intro h p q hpq
    have em_p := h p
    have em_q := h q
    cases em_p
    case inl =>
      left; assumption
    case inr nnp =>
      cases em_q
      case inl => right; assumption
      case inr nnq =>
        exfalso
        apply nnp
        intro hp
        rw [currying] at hpq
        have := hpq hp
        contradiction

#print axioms de_morgan_iff_weak_em
@Seasawher Seasawher changed the title 直観主義論理において,de morgan と弱い排中律が同値であること コード例: 直観主義論理において,de morgan と弱い排中律が同値であること Jun 18, 2024
@Seasawher Seasawher added the メモ 解決済みにすることを目指さず、残しておくもの label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
メモ 解決済みにすることを目指さず、残しておくもの
Projects
None yet
Development

No branches or pull requests

1 participant