lemma"P ∧ Q" apply (rule conjI)
nitpick [expect = genuine] 1
nitpick [= java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 28
nitpick [expect = ne
nitpick [card = 5, expect = genuine]
nitpick [sat_solver = SAT4J,java.lang.StringIndexOutOfBoundsException: Range [9, 5) out of bounds for length 10
appljava.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 23
subsectionjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 38
subsubsection‹
"True"
[expect = none]
auto
"False"
[expect = genuine]
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
"P"
[expect = genuine]
"¬
[expect = genuine]
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
[expect = genuine]
"P ∨
[expect = g
"P Cllc
[expect = genuine]
"(P::bool) = Q"
oops
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma "(A Int B) Un C = (A Un C) Int B"
‹Predicate logic›
"P x y z"
[expect == genuine]
"P x y ⟶ P y x"
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
‹"Every reflexive and symmetric relation is transitive."›
"[∀x. P x x; ∀x y. P x y ⟶ P y x]==> P x y ⟶ P y z ⟶ P x z"
[expect = genuine]
‹The ``Drinker's theorem''›
"∃x. f x = g x ⟶ f = g"
[expect = none]
(auto simp add: ext)
‹And an incorrect version of it›
"(∃x. f x = g x) ⟶ f = g"
[expect = genuine]
‹"Every function has a fixed point."›
"∃x. f x = x"
[expect = genuine]
‹"Function composition is commutative."›
"f (g x) = g (f x)"
[expect = genuine]
‹"Two functions that are equivalent wrt.\ the same predicate 'P' are equal."›
"((P::('a→'b)→bool) f = P g) ⟶ (f x = g x)"
[expect = genuine]
‹Higher-Order Logic›
"∃P. P"
[expect = none]
auto
"∀P. P"
[expect = genuine]
"∃!P. P"
[expect = none]
auto
"∃!P. P x"
[expect = genuine]
"P Q ∨ Q x"
[expect = genuine]
"x ≠ All"
[expect = genuine]
"x ≠ Ex"
[expect = genuine]
"x ≠ Ex1"
[expect = genuine]
‹``The transitive closure of an arbitrary relation is non-empty.''›
"trans" :: "('a → 'a → bool) → bool" where
trans P ≡ (∀x y z. P x y ⟶ P y z ⟶ P x z)"
subset" :: "('a → 'a → bool) → ('a → 'a → bool) → bool" where
subset P Q ≡ (∀x y. P x y ⟶ Q x y)"
trans_closure" :: "('a → 'a → bool) → ('a → 'a → bool) → bool" where
trans_closure P Q ≡ (subset Q P) ∧ (trans P) ∧ (∀R. subset Q R ⟶ trans R ⟶ subset P R)"
"trans_closure T P ⟶ (∃x y. T x y)"
[expect = genuine]
‹``The union of transitive closures is equal to the transitive closure of unions.''›
"(∀x y. (P x y ∨ R x y) ⟶ T x y) ⟶ trans T ⟶ (∀Q. (∀x y. (P x y ∨ R x y) ⟶ Q x y) ⟶ trans Q ⟶ subset T Q) ⟶ trans_closure TP P ⟶ trans_closure TR R ⟶ (T x y = (TP x y ∨ TR x y))"
[expect = genuine]
‹``Every surjective function is invertible.''›
"(∀y. ∃x. y = f x) ⟶ (∃g. ∀x. g (f x) = x)"
[expect = genuine]
‹``Every invertible function is surjective.''›
"(∃g. ∀x. g (f x) = x) ⟶ (∀y. ∃x. y = f x)"
[expect = genuine]
‹``Every point is a fixed point of some function.''›
"∃f. f x = x"
[card = 1-7, expect = none]
(rule_tac x = "λx. x" in exI)
simp
‹Axiom of Choice: first an incorrect version›
"(∀x. ∃y. P x y) ⟶ (∃!f. ∀x. P x (f x))"
[expect = genuine]
‹And now two correct ones›
"(∀x. ∃y. P x y) ⟶ (∃f. ∀x. P x (f x))"
[card = 1-4, expect = none]
(simp add: choice)
"(∀x. ∃!y. P x y) ⟶ (∃!f. ∀x. P x (f x))"
[card = 1-3, expect = none]
auto
apply (simp add: ex1_implies_ex choice)
(fast intro: ext)
‹Metalogic›
"∧x. P x"
[expect = genuine]
"f x ≡ g x"
[expect = genuine]
"P ==> Q"
[expect = genuine]
"[P; Q; R]==> S"
[expect = genuine]
"(x ≡ Pure.all) ==> False"
[expect = genuine]
"(x ≡ (≡)) ==> False"
[expect = genuine]
"(x ≡ (==>)) ==> False"
[expect = genuine]
‹Schematic Variables›
"?P"
[expect = none]
auto
"x = ?y"
[expect = none]
auto
‹Abstractions›
"(λx. x) = (λx. y)"
[expect = genuine]
"(λf. f x) = (λf. True)"
[expect = genuine]
"(λx. x) = (λy. y)"
[expect = none]
simp
‹Sets›
"P (A::'a set)"
[expect = genuine]
"P (A::'a set set)"
[expect = genuine]
"{x. P x} = {y. P y}"
[expect = none]
simp
"x ∈ {x. P x}"
[expect = genuine]
"P (∈)"
[expect = genuine]
"P ((∈) x)"
[expect = genuine]
"P Collect"
[expect = genuine]
"A Un B = A Int B"
[expect = genuine]
"(A Int B) Un C = (A Un C) Int B"
[expect = genuine]
"Ball A P ⟶ Bex A P"
[expect = genuine]
‹const‹undefined››
"undefined"
[expect = genuine]
"P undefined"
[expect = genuine]
"undefined x"
[expect = genuine]
"undefined undefined"
[expect = genuine]
‹const‹The››
"The P"
[expect = genuine]
"P The"
[expect = genuine]
"P (The P)"
[expect = genuine]
"(THE x. x=y) = z"
[expect = genuine]
"Ex P ⟶ P (The P)"
[expect = genuine]
‹const‹Eps››
"Eps P"
[expect = genuine]
"P Eps"
[expect = genuine]
"P (Eps P)"
[expect = genuine]
"(SOME x. x=y) = z"
[expect = genuine]
"Ex P ⟶ P (Eps P)"
[expect = none]
(auto simp add: someI)
‹Operations on Natural Numbers›
"(x::nat) + y = 0"
[expect = genuine]
"(x::nat) = x + x"
[expect = genuine]
"(x::nat) - y + y = x"
[expect = genuine]
"(x::nat) = x * x"
[expect = genuine]
"(x::nat) < x + y"
[card = 1, expect = genuine]
‹×›
"P (x::'a×'b)"
[expect = genuine]
"∀x::'a×'b. P x"
[expect = genuine]
"P (x, y)"
[expect = genuine]
"P (fst x)"
[expect = genuine]
"P (snd x)"
[expect = genuine]
"P Pair"
[expect = genuine]
"P (case x of Pair a b → f a b)"
[expect = genuine]
‹Subtypes (typedef), typedecl›
‹A completely unspecified non-empty subset of typ‹'a›:›
"rec_aexp number ite equal (Number x) = number x"
[card = 1-3, expect = none]
simp
"rec_aexp number ite equal (ITE x y z) = ite x y z (rec_bexp number ite equal x) (rec_aexp number ite equal y) (rec_aexp number ite equal z)"
[card = 1-3, expect = none]
simp
"P (rec_aexp number ite equal x)"
[expect = genuine]
"P (case x of Number a → number a | ITE b a1 a2 → ite b a1 a2)"
[expect = genuine]
"rec_bexp number ite equal (Equal x y) = equal x y (rec_aexp number ite equal x) (rec_aexp number ite equal y)"
[card = 1-3, expect = none]
simp
"P (rec_bexp number ite equal x)"
[expect = genuine]
"P (case x of Equal a1 a2 → equal a1 a2)"
[expect = genuine]
X = A | B X | C Y and Y = D X | E Y | F
"P (x::X)"
[expect = genuine]
"P (y::Y)"
[expect = genuine]
"P (B (B A))"
[expect = genuine]
"P (B (C F))"
[expect = genuine]
"P (C (D A))"
[expect = genuine]
"P (C (E F))"
[expect = genuine]
"P (D (B A))"
[expect = genuine]
"P (D (C F))"
[expect = genuine]
"P (E (D A))"
[expect = genuine]
"P (E (E F))"
[expect = genuine]
"P (C (D (C F)))"
[expect = genuine]
"rec_X a b c d e f A = a"
[card = 1-5, expect = none]
simp
"rec_X a b c d e f (B x) = b x (rec_X a b c d e f x)"
[card = 1-5, expect = none]
simp
"rec_X a b c d e f (C y) = c y (rec_Y a b c d e f y)"
[card = 1-5, expect = none]
simp
"rec_Y a b c d e f (D x) = d x (rec_X a b c d e f x)"
[card = 1-5, expect = none]
simp
"rec_Y a b c d e f (E y) = e y (rec_Y a b c d e f y)"
[card = 1-5, expect = none]
simp
"rec_Y a b c d e f F = f"
[card = 1-5, expect = none]
simp
"P (rec_X a b c d e f x)"
[expect = genuine]
"P (rec_Y a b c d e f y)"
[expect = genuine]
‹Other datatype examples›
‹Indirect recursion is implemented via mutual recursion.›
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.