Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Smt/Preprocess/Embedding/Bool.lean
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ theorem forall_bool_in_as_prop₅ {p : (α₁ → α₂ → α₃ → α₄ →
simp only [@Bool.decide_eq_true] at hf
exact hf

@[embedding ↓]
theorem forall_bool_in_as_prop₆ {p : (α₁ → α₂ → α₃ → α₄ → α₅ → Bool → α₆) → Prop} :
(∀ f : α₁ → α₂ → α₃ → α₄ → α₅ → Bool → α₆, p f) ↔ (∀ f : α₁ → α₂ → α₃ → α₄ → α₅ → Prop → α₆, p fun a₁ a₂ a₃ a₄ a₅ b => f a₁ a₂ a₃ a₄ a₅ b) := by
constructor
· intro h f
apply h
· intro h f
have hf := h fun a₁ a₂ a₃ a₄ a₅ x => f a₁ a₂ a₃ a₄ a₅ x
simp only [@Bool.decide_eq_true] at hf
exact hf

@[embedding ↓]
theorem forall_bool_out_as_prop₁ {p : (α₁ → Bool) → Prop} :
(∀ f : α₁ → Bool, p f) ↔ (∀ f : α₁ → Prop, p (fun a₁ => f a₁)) := by
Expand Down Expand Up @@ -229,4 +240,15 @@ theorem forall_bool_out_as_prop₅ {p : (α₁ → α₂ → α₃ → α₄ →
simp only [@Bool.decide_eq_true] at hf
exact hf

@[embedding ↓]
theorem forall_bool_out_as_prop₆ {p : (α₁ → α₂ → α₃ → α₄ → α₅ → α₆ → Bool) → Prop} :
(∀ f : α₁ → α₂ → α₃ → α₄ → α₅ → α₆ → Bool, p f) ↔ (∀ f : α₁ → α₂ → α₃ → α₄ → α₅ → α₆ → Prop, p (fun a₁ a₂ a₃ a₄ a₅ a₆ => f a₁ a₂ a₃ a₄ a₅ a₆)) := by
constructor
· intro h f
apply h
· intro h f
have hf := h (fun a₁ a₂ a₃ a₄ a₅ a₆ => f a₁ a₂ a₃ a₄ a₅ a₆)
simp only [@Bool.decide_eq_true] at hf
exact hf

end Smt.Preprocess.Embedding
Empty file added Test/Bool/Arity6.expected
Empty file.
17 changes: 17 additions & 0 deletions Test/Bool/Arity6.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Smt

theorem out_arity_5 {α : Type} [Nonempty α] (r : α → α → α → α → α → Bool) (a b : α)
(h : ∀ x y z u v, r x y z u v = true → x ≠ y) (hab : r a b a b a = true) : a ≠ b := by
smt [h, hab]

theorem out_arity_6 {α : Type} [Nonempty α] (r : α → α → α → α → α → α → Bool) (a b : α)
(h : ∀ x y z u v w, r x y z u v w = true → x ≠ y) (hab : r a b a b a b = true) : a ≠ b := by
smt [h, hab]

theorem in_arity_5 {α : Type} [Nonempty α] (f : α → α → α → α → Bool → α) (a : α)
(h : ∀ x y z u (b : Bool), f x y z u b = x) : f a a a a true = a := by
smt [h]

theorem in_arity_6 {α : Type} [Nonempty α] (f : α → α → α → α → α → Bool → α) (a : α)
(h : ∀ x y z u v (b : Bool), f x y z u v b = x) : f a a a a a true = a := by
smt [h]
4 changes: 2 additions & 2 deletions Test/Bool/Assoc.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Test/Bool/Assoc.lean:5:2: error: unable to prove goal, either it is false or you need to provide more facts. Here is a potential counter-example:

q = False
r = False
f = fun _arg_1 _arg_2 => if _arg_1 then ¬_arg_2 else ¬_arg_1 ∧ ¬_arg_2
p = True
r = False
q = False
2 changes: 1 addition & 1 deletion Test/Bool/Comm.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Test/Bool/Comm.lean:4:2: error: unable to prove goal, either it is false or you need to provide more facts. Here is a potential counter-example:

q = True
f = fun _arg_1 _arg_2 => _arg_1 ∧ ¬_arg_2
p = False
f = fun _arg_1 _arg_2 => _arg_1 ∧ ¬_arg_2