Skip to content

Commit

Permalink
minor tweaks to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcommelin committed Feb 3, 2025
1 parent 615b8de commit 691a3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions AesopTest/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ theorem X.append_ne_nil_of_ne_nil_left (s t : List α) : s ≠ [] → s ++ t ≠
theorem X.append_ne_nil_of_ne_nil_right (s t : List α) : t ≠ [] → s ++ t ≠ [] := by
induction s <;> aesop

attribute [-simp] append_eq_nil
@[simp] theorem X.append_eq_nil {p q : List α} : (p ++ q) = [] ↔ p = [] ∧ q = [] := by
aesop (add 1% cases List)

Expand Down Expand Up @@ -718,7 +717,7 @@ theorem replicate_right_injective (a : α) : Injective (λ n => replicate n a) :
/-! ### flatMap -/

instance : Bind List where
bind l f := List.flatMap l f
bind l f := List.flatMap f l

@[simp] theorem bind_eq_flatMap {α β} (f : α → List β) (l : List α) :
l >>= f = l.flatMap f := rfl
Expand Down
8 changes: 4 additions & 4 deletions AesopTest/RulePattern.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ example (m n : Nat) : (↑m : Int) < 0 ∧ (↑n : Int) > 0 := by
set_option aesop.check.script false in
aesop!
all_goals
guard_hyp fwd_2 : 0 ≤ (n : Int)
guard_hyp fwd_1 : 0 ≤ (m : Int)
guard_hyp fwd : 0 ≤ (n : Int)
guard_hyp fwd_2 : 0 ≤ (m : Int)
falso

@[aesop safe forward (pattern := min x y)]
Expand All @@ -44,8 +44,8 @@ axiom triangle (a b : Int) : |a + b| ≤ |a| + |b|

example : |a + b| ≤ |c + d| := by
aesop!
guard_hyp fwd : |c + d| ≤ |c| + |d|
guard_hyp fwd_1 : |a + b| ≤ |a| + |b|
guard_hyp fwd_1 : |c + d| ≤ |c| + |d|
guard_hyp fwd : |a + b| ≤ |a| + |b|
falso

@[aesop safe apply (pattern := (0 : Nat))]
Expand Down

0 comments on commit 691a3d3

Please sign in to comment.