Theory PseudoWaisbergAlgebra
section‹Pseudo Waisberg Algebra›
theory PseudoWaisbergAlgebra
imports Operations
begin
class impl_lr_algebra = one + left_imp + right_imp +
assumes W1a [simp]: "1 l→ a = a"
and W1b [simp]: "1 r→ a = a"
and W2a: "(a l→ b) r→ b = (b l→ a) r→ a"
and W2b: "(b l→ a) r→ a = (b r→ a) l→ a"
and W2c: "(b r→ a) l→ a = (a r→ b) l→ b"
and W3a: "(a l→ b) l→ ((b l→ c) r→ (a l→ c)) = 1"
and W3b: "(a r→ b) r→ ((b r→ c) l→ (a r→ c)) = 1"
begin
lemma P1_a [simp]: "x l→ x = 1"
apply (cut_tac a = 1 and b = 1 and c = x in W3b)
by simp
lemma P1_b [simp]: "x r→ x = 1"
apply (cut_tac a = 1 and b = 1 and c = x in W3a)
by simp
lemma P2_a: "x l→ y = 1 ⟹ y l→ x = 1 ⟹ x = y"
apply (subgoal_tac "(y l→ x) r→ x = y")
apply simp
apply (subgoal_tac "(x l→ y) r→ y = y")
apply (unfold W2a)
by simp_all
lemma P2_b: "x r→ y = 1 ⟹ y r→ x = 1 ⟹ x = y"
apply (subgoal_tac "(y r→ x) l→ x = y")
apply simp
apply (subgoal_tac "(x r→ y) l→ y = y")
apply (unfold W2c)
by simp_all
lemma P2_c: "x l→ y = 1 ⟹ y r→ x = 1 ⟹ x = y"
apply (subgoal_tac "(y r→ x) l→ x = y")
apply simp
apply (subgoal_tac "(x l→ y) r→ y = y")
apply (unfold W2b) [1]
apply (unfold W2c) [1]
by simp_all
lemma P3_a: "(x l→ 1) r→ 1 = 1"
apply (unfold W2a)
by simp
lemma P3_b: "(x r→ 1) l→ 1 = 1"
apply (unfold W2c)
by simp
lemma P4_a [simp]: "x l→ 1 = 1"
apply (subgoal_tac "x l→ ((x l→ 1) r→ 1) = 1")
apply (simp add: P3_a)
apply (cut_tac a = 1 and b = x and c = 1 in W3a)
by simp
lemma P4_b [simp]: "x r→ 1 = 1"
apply (subgoal_tac "x r→ ((x r→ 1) l→ 1) = 1")
apply (simp add: P3_b)
apply (cut_tac a = 1 and b = x and c = 1 in W3b)
by simp
lemma P5_a: "x l→ y = 1 ⟹ y l→ z = 1 ⟹ x l→ z = 1"
apply (cut_tac a = x and b = y and c = z in W3a)
by simp
lemma P5_b: "x r→ y = 1 ⟹ y r→ z = 1 ⟹ x r→ z = 1"
apply (cut_tac a = x and b = y and c = z in W3b)
by simp
lemma P6_a: "x l→ (y r→ x) = 1"
apply (cut_tac a = y and b = 1 and c = x in W3b)
by simp
lemma P6_b: "x r→ (y l→ x) = 1"
apply (cut_tac a = y and b = 1 and c = x in W3a)
by simp
lemma P7: "(x l→ (y r→ z) = 1) = (y r→ (x l→ z) = 1)"
proof
fix x y z assume A: "x l→ y r→ z = 1" show "y r→ x l→ z = 1"
apply (rule_tac y = "(z r→ y) l→ y" in P5_b)
apply (simp add: P6_b)
apply (unfold W2c)
apply (subgoal_tac "(x l→ (y r→ z)) l→ (((y r→ z) l→ z) r→ x l→ z) = 1")
apply (unfold A) [1]
apply simp
by (simp add: W3a)
next
fix x y z assume A: "y r→ x l→ z = 1" show "x l→ y r→ z = 1"
apply (rule_tac y = "(z l→ x) r→ x" in P5_a)
apply (simp add: P6_a)
apply (unfold W2a)
apply (subgoal_tac "(y r→ x l→ z) r→ (((x l→ z) r→ z) l→ y r→ z) = 1")
apply (unfold A) [1]
apply simp
by (simp add: W3b)
qed
lemma P8_a: "(x l→ y) r→ ((z l→ x) l→ (z l→ y)) = 1"
by (simp add: W3a P7 [THEN sym])
lemma P8_b: "(x r→ y) l→ ((z r→ x) r→ (z r→ y)) = 1"
by (simp add: W3b P7)
lemma P9: "x l→ (y r→ z) = y r→ (x l→ z)"
apply (rule P2_c)
apply (subst P7)
apply (rule_tac y = "(z r→ y) l→ y" in P5_b)
apply (simp add: P6_b)
apply (subst W2c)
apply (rule P8_a)
apply (subst P7 [THEN sym])
apply (rule_tac y = "(z l→ x) r→ x" in P5_a)
apply (simp add: P6_a)
apply (subst W2a)
by (simp add: P8_b)
definition
"lesseq_a a b = (a l→ b = 1)"
definition
"less_a a b = (lesseq_a a b ∧ ¬ lesseq_a b a)"
definition
"lesseq_b a b = (a r→ b = 1)"
definition
"less_b a b = (lesseq_b a b ∧ ¬ lesseq_b b a)"
definition
"sup_a a b = (a l→ b) r→ b"
end