Created
May 9, 2020 21:57
-
-
Save jorendorff/e4ef1ef7949ddd6043f672a0a1dad6e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Rule of Modus Ponens. The postulated inference rule of propositional | |
-- calculus. See e.g. Rule 1 of [Hamilton] p. 73. The rule says, "if π is | |
-- true, and π implies π, then π must also be true." This rule is sometimes | |
-- called "detachment," since it detaches the minor premise from the major | |
-- premise. "Modus ponens" is short for "modus ponendo ponens," a Latin phrase | |
-- that means "the mode that by affirming affirms" - remark in [Sanford] | |
-- p. 39. This rule is similar to the rule of modus tollens mto 176. | |
-- | |
-- Note: In some web page displays such as the Statement List, the symbols | |
-- "& " and "β " informally indicate the relationship between the hypotheses | |
-- and the assertion (conclusion), abbreviating the English words "and" and | |
-- "implies." They are not part of the formal language. (Contributed by NM, | |
-- 30-Sep-1992.) | |
-- | |
-- β’ π & β’ (π β π) β β’ π | |
def ax_mp {Ο Ο} (a : Ο) (ab : Ο β Ο) : Ο := ab a | |
-- Axiom Simp. Axiom A1 of [Margaris] p. 49. One of the 3 axioms of | |
-- propositional calculus. The 3 axioms are also given as Definition 2.1 of | |
-- [Hamilton] p. 28. This axiom is called Simp or "the principle of | |
-- simplification" in Principia Mathematica (Theorem *2.02 of | |
-- [WhiteheadRussell] p. 100) because "it enables us to pass from the joint | |
-- assertion of π and π to the assertion of π simply." It is Proposition 1 of | |
-- [Frege1879] p. 26, its first axiom. (Contributed by NM, 30-Sep-1992.) | |
-- β’ (π β (π β π)) | |
def ax_1 {Ο Ο} : Ο β (Ο β Ο) := | |
assume a b, a | |
-- Axiom Frege. Axiom A2 of [Margaris] p. 49. One of the 3 axioms of | |
-- propositional calculus. It "distributes" an antecedent over two | |
-- consequents. This axiom was part of Frege's original system and is known as | |
-- Frege in the literature; see Proposition 2 of [Frege1879] p. 26. It is also | |
-- proved as Theorem *2.77 of [WhiteheadRussell] p. 108. The other direction | |
-- of this axiom also turns out to be true, as demonstrated by pm5.41 364. | |
-- (Contributed by NM, 30-Sep-1992.) | |
-- β’ ((π β (π β π)) β ((π β π) β (π β π))) | |
def ax_2 {Ο Ο Ο} : (Ο β Ο β Ο) β (Ο β Ο) β Ο β Ο := | |
assume abc ab a, abc a (ab a) | |
open classical | |
-- Axiom Transp. Axiom A3 of [Margaris] p. 49. One of the 3 axioms of | |
-- propositional calculus. It swaps or "transposes" the order of the | |
-- consequents when negation is removed. An informal example is that the | |
-- statement "if there are no clouds in the sky, it is not raining" implies | |
-- the statement "if it is raining, there are clouds in the sky." This axiom | |
-- is called Transp or "the principle of transposition" in Principia | |
-- Mathematica (Theorem *2.17 of [WhiteheadRussell] p. 103). We will also use | |
-- the term "contraposition" for this principle, although the reader is | |
-- advised that in the field of philosophical logic, "contraposition" has a | |
-- different technical meaning. (Contributed by NM, 30-Sep-1992.) | |
-- β’ ((Β¬ π β Β¬ π) β (π β π)) | |
def ax_3 {Ο Ο} : (Β¬Ο β Β¬Ο) β (Ο β Ο) := by_cases | |
(assume (a : Ο) _ _, a) | |
(assume (na : Β¬Ο) (nanb : Β¬Ο β Β¬Ο) (b : Ο), | |
absurd b (nanb na)) | |
-- A double modus ponens inference. (Contributed by NM, 5-Apr-1994.) | |
def mp2 {Ο Ο Ο} (a : Ο) (b : Ο) (f : Ο β Ο β Ο) : Ο := | |
f a b | |
-- A double modus ponens inference. (Contributed by Mario Carneiro, 24-Jan-2013.) | |
-- β’ π & β’ (π β π) & β’ (π β π) β β’ π | |
def mp2b {Ο Ο Ο} (a : Ο) (ab : Ο β Ο) (bc : Ο β Ο) : Ο := | |
bc (ab a) | |
-- Description: Inference derived from axiom ax-1 6. See a1d 25 for an | |
-- explanation of our informal use of the terms "inference" and "deduction." | |
-- See also the comment in syld 44. (Contributed by NM, 29-Dec-1992.) | |
-- β’ π β β’ (π β π) | |
def a1i {Ο Ο} (a : Ο) : Ο β Ο := | |
ax_1 a | |
-- Drop and replace an antecedent. (Contributed by Stefan O'Rear, | |
-- 29-Jan-2015.) | |
-- β’ π & β’ (π β π) β β’ (π β π) | |
def mp1i {Ο Ο Ο} (a : Ο) (ab : Ο β Ο) : Ο β Ο := | |
a1i (ax_mp a ab) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment