tasksource/leandojo huggingface dataset:
Theorem: Quiver.Path.comp_assoc
File: Mathlib/Combinatorics/Quiver/Path.lean

tactic: rw [comp_cons, comp_cons, comp_cons, comp_assoc p q r]
state_before: V : Type u
inst✝ : Quiver V
a✝¹ b✝¹ c✝ d a b c x✝ : V
p : Path a b
q : Path b c
b✝ : V
r : Path c b✝
a✝ : b✝ ⟶ x✝
⊢ comp (comp p q) (cons r a✝) = comp p (comp q (cons r a✝))
Theorem: Matrix.blockDiagonal_transpose
File: Mathlib/Data/Matrix/Block.lean

tactic: ext
state_before: l : Type ?u.131023
m : Type u_1
n : Type u_2
o : Type u_4
p : Type ?u.131035
q : Type ?u.131038
m' : o → Type ?u.131043
n' : o → Type ?u.131048
p' : o → Type ?u.131053
R : Type ?u.131056
S : Type ?u.131059
α : Type u_3
β : Type ?u.131065
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : o → Matrix m n α
⊢ (blockDiagonal M)ᵀ = blockDiagonal fun k => (M k)ᵀ

tactic: simp only [transpose_apply, blockDiagonal_apply, eq_comm]
state_before: case a.h
l : Type ?u.131023
m : Type u_1
n : Type u_2
o : Type u_4
p : Type ?u.131035
q : Type ?u.131038
m' : o → Type ?u.131043
n' : o → Type ?u.131048
p' : o → Type ?u.131053
R : Type ?u.131056
S : Type ?u.131059
α : Type u_3
β : Type ?u.131065
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : o → Matrix m n α
i✝ : n × o
x✝ : m × o
⊢ (blockDiagonal M)ᵀ i✝ x✝ = blockDiagonal (fun k => (M k)ᵀ) i✝ x✝

tactic: split_ifs with h
state_before: case a.h
l : Type ?u.131023
m : Type u_1
n : Type u_2
o : Type u_4
p : Type ?u.131035
q : Type ?u.131038
m' : o → Type ?u.131043
n' : o → Type ?u.131048
p' : o → Type ?u.131053
R : Type ?u.131056
S : Type ?u.131059
α : Type u_3
β : Type ?u.131065
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : o → Matrix m n α
i✝ : n × o
x✝ : m × o
⊢ (if i✝.snd = x✝.snd then M i✝.snd x✝.fst i✝.fst else 0) = if i✝.snd = x✝.snd then M x✝.snd x✝.fst i✝.fst else 0

tactic: rw [h]
state_before: case a.h.inl
l : Type ?u.131023
m : Type u_1
n : Type u_2
o : Type u_4
p : Type ?u.131035
q : Type ?u.131038
m' : o → Type ?u.131043
n' : o → Type ?u.131048
p' : o → Type ?u.131053
R : Type ?u.131056
S : Type ?u.131059
α : Type u_3
β : Type ?u.131065
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : o → Matrix m n α
i✝ : n × o
x✝ : m × o
h : i✝.snd = x✝.snd
⊢ M i✝.snd x✝.fst i✝.fst = M x✝.snd x✝.fst i✝.fst

tactic: rfl
state_before: case a.h.inr
l : Type ?u.131023
m : Type u_1
n : Type u_2
o : Type u_4
p : Type ?u.131035
q : Type ?u.131038
m' : o → Type ?u.131043
n' : o → Type ?u.131048
p' : o → Type ?u.131053
R : Type ?u.131056
S : Type ?u.131059
α : Type u_3
β : Type ?u.131065
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : o → Matrix m n α
i✝ : n × o
x✝ : m × o
h : ¬i✝.snd = x✝.snd
⊢ 0 = 0
Theorem: Finite.exists_min
File: Mathlib/Data/Fintype/Lattice.lean

tactic: cases nonempty_fintype α
state_before: α : Type u_1
β : Type u_2
inst✝² : Finite α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x

tactic: simpa using exists_min_image univ f univ_nonempty
state_before: case intro
α : Type u_1
β : Type u_2
inst✝² : Finite α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
val✝ : Fintype α
⊢ ∃ x₀, ∀ (x : α), f x₀ ≤ f x
Theorem: norm_sup_le_add
File: Mathlib/Analysis/Normed/Order/Lattice.lean

tactic: have h : ‖x ⊔ y - 0 ⊔ 0‖ ≤ ‖x - 0‖ + ‖y - 0‖ := norm_sup_sub_sup_le_add_norm x y 0 0
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
x y : α
⊢ ‖x ⊔ y‖ ≤ ‖x‖ + ‖y‖

tactic: simpa only [sup_idem, sub_zero] using h
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
x y : α
h : ‖x ⊔ y - 0 ⊔ 0‖ ≤ ‖x - 0‖ + ‖y - 0‖
⊢ ‖x ⊔ y‖ ≤ ‖x‖ + ‖y‖
Theorem: orderOf_one
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rw [orderOf, ← minimalPeriod_id (x := (1:G)), ← one_mul_eq_id]
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
⊢ orderOf 1 = 1
Theorem: Nat.dvd_iff_div_factorization_eq_tsub
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: refine' ⟨factorization_div, _⟩
state_before: d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
⊢ d ∣ n ↔ factorization (n / d) = factorization n - factorization d

tactic: rcases eq_or_lt_of_le hdn with (rfl | hd_lt_n)
state_before: d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
⊢ factorization (n / d) = factorization n - factorization d → d ∣ n

tactic: have h1 : n / d ≠ 0 := fun H => Nat.lt_asymm hd_lt_n ((Nat.div_eq_zero_iff hd.bot_lt).mp H)
state_before: case inr
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
⊢ factorization (n / d) = factorization n - factorization d → d ∣ n

tactic: intro h
state_before: case inr
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
h1 : n / d ≠ 0
⊢ factorization (n / d) = factorization n - factorization d → d ∣ n

tactic: rw [dvd_iff_le_div_mul n d]
state_before: case inr
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
h1 : n / d ≠ 0
h : factorization (n / d) = factorization n - factorization d
⊢ d ∣ n

tactic: by_contra h2
state_before: case inr
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
h1 : n / d ≠ 0
h : factorization (n / d) = factorization n - factorization d
⊢ n ≤ n / d * d

tactic: cases' exists_factorization_lt_of_lt (mul_ne_zero h1 hd) (not_le.mp h2) with p hp
state_before: case inr
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
h1 : n / d ≠ 0
h : factorization (n / d) = factorization n - factorization d
h2 : ¬n ≤ n / d * d
⊢ False

tactic: rwa [factorization_mul h1 hd, add_apply, ← lt_tsub_iff_right, h, tsub_apply,
 lt_self_iff_false] at hp
state_before: case inr.intro
d n : ℕ
hd : d ≠ 0
hdn : d ≤ n
hd_lt_n : d < n
h1 : n / d ≠ 0
h : factorization (n / d) = factorization n - factorization d
h2 : ¬n ≤ n / d * d
p : ℕ
hp : ↑(factorization (n / d * d)) p < ↑(factorization n) p
⊢ False

tactic: simp
state_before: case inl
d : ℕ
hd : d ≠ 0
hdn : d ≤ d
⊢ factorization (d / d) = factorization d - factorization d → d ∣ d
Theorem: Std.BinomialHeapImp.Heap.realSize_tail?
File: Std/Data/BinomialHeap.lean

tactic: simp only [Heap.tail?]
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ tail? le s = some s' → realSize s = realSize s' + 1

tactic: intro eq
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ Option.map (fun x => x.snd) (deleteMin le s) = some s' → realSize s = realSize s' + 1

tactic: match eq₂ : s.deleteMin le, eq with
| some (a, tl), rfl => exact realSize_deleteMin eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
⊢ realSize s = realSize s' + 1

tactic: exact realSize_deleteMin eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
a : α
tl : Heap α
eq₂ : deleteMin le s = some (a, tl)
⊢ realSize s = realSize ((fun x => x.snd) (a, tl)) + 1
Theorem: Multiset.union_add_inter
File: Mathlib/Data/Multiset/Basic.lean

tactic: apply _root_.le_antisymm
state_before: α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s ∪ t + s ∩ t = s + t

tactic: rw [union_add_distrib]
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s ∪ t + s ∩ t ≤ s + t

tactic: refine' union_le (add_le_add_left (inter_le_right _ _) _) _
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s + s ∩ t ∪ (t + s ∩ t) ≤ s + t

tactic: rw [add_comm]
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ t + s ∩ t ≤ s + t

tactic: exact add_le_add_right (inter_le_left _ _) _
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s ∩ t + t ≤ s + t

tactic: rw [add_comm, add_inter_distrib]
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s + t ≤ s ∪ t + s ∩ t

tactic: refine' le_inter (add_le_add_right (le_union_right _ _) _) _
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ t + s ≤ (s ∪ t + s) ∩ (s ∪ t + t)

tactic: rw [add_comm]
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ t + s ≤ s ∪ t + t

tactic: exact add_le_add_right (le_union_left _ _) _
state_before: case a
α : Type u_1
β : Type ?u.190902
γ : Type ?u.190905
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s + t ≤ s ∪ t + t
Theorem: Nat.dist_pos_of_ne
File: Mathlib/Data/Nat/Dist.lean

tactic: rw [dist_eq_sub_of_le (le_of_lt h)]
state_before: i j : ℕ
hne : i ≠ j
h : i < j
⊢ 0 < dist i j

tactic: apply tsub_pos_of_lt h
state_before: i j : ℕ
hne : i ≠ j
h : i < j
⊢ 0 < j - i

tactic: contradiction
state_before: i j : ℕ
hne : i ≠ j
h : i = j
⊢ 0 < dist i j

tactic: rw [dist_eq_sub_of_le_right (le_of_lt h)]
state_before: i j : ℕ
hne : i ≠ j
h : i > j
⊢ 0 < dist i j

tactic: apply tsub_pos_of_lt h
state_before: i j : ℕ
hne : i ≠ j
h : i > j
⊢ 0 < i - j
Theorem: geom_sum_Ico_mul
File: Mathlib/Algebra/GeomSum.lean

tactic: rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul, geom_sum_mul, sub_sub_sub_cancel_right]
state_before: α : Type u
inst✝ : Ring α
x : α
m n : ℕ
hmn : m ≤ n
⊢ (∑ i in Ico m n, x ^ i) * (x - 1) = x ^ n - x ^ m
Theorem: Filter.tendsto_atTop_diagonal
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [← prod_atTop_atTop_eq]
state_before: ι : Type ?u.282150
ι' : Type ?u.282153
α : Type u_1
β : Type ?u.282159
γ : Type ?u.282162
inst✝ : SemilatticeSup α
⊢ Tendsto (fun a => (a, a)) atTop atTop

tactic: exact tendsto_id.prod_mk tendsto_id
state_before: ι : Type ?u.282150
ι' : Type ?u.282153
α : Type u_1
β : Type ?u.282159
γ : Type ?u.282162
inst✝ : SemilatticeSup α
⊢ Tendsto (fun a => (a, a)) atTop (atTop ×ˢ atTop)
Theorem: Array.size_ofFn_go
File: Std/Data/Array/Lemmas.lean

tactic: if hin : i < n then
  unfold ofFn.go
  have : 1 + (n - (i + 1)) = n - i :=
    Nat.sub_sub .. ▸ Nat.add_sub_cancel' (Nat.le_sub_of_add_le (Nat.add_comm .. ▸ hin))
  rw [dif_pos hin, size_ofFn_go f (i+1), size_push, Nat.add_assoc, this]
else
  have : n - i = 0 := Nat.sub_eq_zero_of_le (Nat.le_of_not_lt hin)
  unfold ofFn.go
  simp [hin, this]
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
⊢ size (ofFn.go f i acc) = size acc + (n - i)

tactic: unfold ofFn.go
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : i < n
⊢ size (ofFn.go f i acc) = size acc + (n - i)

tactic: have : 1 + (n - (i + 1)) = n - i :=
  Nat.sub_sub .. ▸ Nat.add_sub_cancel' (Nat.le_sub_of_add_le (Nat.add_comm .. ▸ hin))
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : i < n
⊢ size (if h : i < n then ofFn.go f (i + 1) (push acc (f { val := i, isLt := h })) else acc) = size acc + (n - i)

tactic: rw [dif_pos hin, size_ofFn_go f (i+1), size_push, Nat.add_assoc, this]
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : i < n
this : 1 + (n - (i + 1)) = n - i
⊢ size (if h : i < n then ofFn.go f (i + 1) (push acc (f { val := i, isLt := h })) else acc) = size acc + (n - i)

tactic: have : n - i = 0 := Nat.sub_eq_zero_of_le (Nat.le_of_not_lt hin)
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : ¬i < n
⊢ size (ofFn.go f i acc) = size acc + (n - i)

tactic: unfold ofFn.go
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : ¬i < n
this : n - i = 0
⊢ size (ofFn.go f i acc) = size acc + (n - i)

tactic: simp [hin, this]
state_before: α : Type u_1
n : Nat
f : Fin n → α
i : Nat
acc : Array α
hin : ¬i < n
this : n - i = 0
⊢ size (if h : i < n then ofFn.go f (i + 1) (push acc (f { val := i, isLt := h })) else acc) = size acc + (n - i)
Theorem: LaurentPolynomial.commute_T
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: rw [T, T, ← single_eq_C, single_mul_single, single_mul_single, single_mul_single]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℤ
f : R[T;T⁻¹]
m : ℤ
a : R
⊢ T n * (↑C a * T m) = ↑C a * T m * T n

tactic: simp [add_comm]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℤ
f : R[T;T⁻¹]
m : ℤ
a : R
⊢ AddMonoidAlgebra.single (n + (0 + m)) (1 * (a * 1)) = AddMonoidAlgebra.single (0 + m + n) (a * 1 * 1)
Theorem: Stream'.WSeq.destruct_cons
File: Mathlib/Data/Seq/WSeq.lean

tactic: simp [destruct, cons, Computation.rmap]
state_before: α : Type u
β : Type v
γ : Type w
a : α
s : WSeq α
⊢ Computation.destruct (destruct (cons a s)) = Sum.inl (some (a, s))
Theorem: Nat.SOM.Mon.append_denote
File: src/lean/Init/Data/Nat/SOM.lean

tactic: match m₁ with
| [] => simp! [Nat.one_mul]
| v :: m₁ => simp! [append_denote ctx m₁ m₂, Nat.mul_assoc]
state_before: ctx : Context
m₁ m₂ : Mon
⊢ denote ctx (m₁ ++ m₂) = denote ctx m₁ * denote ctx m₂

tactic: simp! [Nat.one_mul]
state_before: ctx : Context
m₁ m₂ : Mon
⊢ denote ctx ([] ++ m₂) = denote ctx [] * denote ctx m₂

tactic: simp! [append_denote ctx m₁ m₂, Nat.mul_assoc]
state_before: ctx : Context
m₁✝ m₂ : Mon
v : Var
m₁ : List Var
⊢ denote ctx (v :: m₁ ++ m₂) = denote ctx (v :: m₁) * denote ctx m₂
Theorem: Polynomial.modByMonic_X_sub_C_eq_C_eval
File: Mathlib/Data/Polynomial/Div.lean

tactic: nontriviality R
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
⊢ p %ₘ (X - ↑C a) = ↑C (eval a p)

tactic: have h : (p %ₘ (X - C a)).eval a = p.eval a := by
  rw [modByMonic_eq_sub_mul_div _ (monic_X_sub_C a), eval_sub, eval_mul, eval_sub, eval_X,
    eval_C, sub_self, MulZeroClass.zero_mul, sub_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
⊢ p %ₘ (X - ↑C a) = ↑C (eval a p)

tactic: have : degree (p %ₘ (X - C a)) < 1 :=
  degree_X_sub_C a ▸ degree_modByMonic_lt p (monic_X_sub_C a)
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
⊢ p %ₘ (X - ↑C a) = ↑C (eval a p)

tactic: rw [eq_C_of_degree_le_zero this, eval_C] at h
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
this✝ : degree (p %ₘ (X - ↑C a)) < 1
this : degree (p %ₘ (X - ↑C a)) ≤ 0
⊢ p %ₘ (X - ↑C a) = ↑C (eval a p)

tactic: rw [eq_C_of_degree_le_zero this, h]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : coeff (p %ₘ (X - ↑C a)) 0 = eval a p
this✝ : degree (p %ₘ (X - ↑C a)) < 1
this : degree (p %ₘ (X - ↑C a)) ≤ 0
⊢ p %ₘ (X - ↑C a) = ↑C (eval a p)

tactic: rw [modByMonic_eq_sub_mul_div _ (monic_X_sub_C a), eval_sub, eval_mul, eval_sub, eval_X,
  eval_C, sub_self, MulZeroClass.zero_mul, sub_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
⊢ eval a (p %ₘ (X - ↑C a)) = eval a p

tactic: revert this
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
this : degree (p %ₘ (X - ↑C a)) < 1
⊢ degree (p %ₘ (X - ↑C a)) ≤ 0

tactic: cases degree (p %ₘ (X - C a))
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
⊢ degree (p %ₘ (X - ↑C a)) < 1 → degree (p %ₘ (X - ↑C a)) ≤ 0

tactic: exact fun _ => bot_le
state_before: case none
R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
⊢ none < 1 → none ≤ 0

tactic: exact fun h => WithBot.some_le_some.2 (Nat.le_of_lt_succ (WithBot.some_lt_some.1 h))
state_before: case some
R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
✝ : Nontrivial R
h : eval a (p %ₘ (X - ↑C a)) = eval a p
val✝ : ℕ
⊢ some val✝ < 1 → some val✝ ≤ 0
Theorem: Finset.prod_insertNone
File: Mathlib/Algebra/BigOperators/Option.lean

tactic: simp [insertNone]
state_before: α : Type u_1
M : Type u_2
inst✝ : CommMonoid M
f : Option α → M
s : Finset α
⊢ ∏ x in ↑insertNone s, f x = f none * ∏ x in s, f (some x)
Theorem: CategoryTheory.Functor.map_dite
File: Mathlib/CategoryTheory/Functor/Basic.lean

tactic: aesop_cat
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
E : Type u₃
inst✝¹ : Category E
F : C ⥤ D
X Y : C
P : Prop
inst✝ : Decidable P
f : P → (X ⟶ Y)
g : ¬P → (X ⟶ Y)
⊢ F.map (if h : P then f h else g h) = if h : P then F.map (f h) else F.map (g h)
Theorem: Polynomial.not_isRoot_C
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simpa using hr
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a✝ b : R
m n : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
x r a : R
hr : r ≠ 0
⊢ ¬IsRoot (↑C r) a
Theorem: NormedSpace.inclusionInDoubleDual_norm_le
File: Mathlib/Analysis/NormedSpace/Dual.lean

tactic: rw [inclusionInDoubleDual_norm_eq]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type ?u.27970
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
⊢ ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1

tactic: exact ContinuousLinearMap.norm_id_le
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type ?u.27970
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
⊢ ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖ ≤ 1
Theorem: ScottContinuous.monotone
File: Mathlib/Order/Directed.lean

tactic: intro a b hab
state_before: α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
⊢ Monotone f

tactic: apply e1.1
state_before: α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
e1 : IsLUB (f '' {a, b}) (f b)
⊢ f a ≤ f b

tactic: rw [Set.image_pair]
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
e1 : IsLUB (f '' {a, b}) (f b)
⊢ f a ∈ f '' {a, b}

tactic: exact Set.mem_insert _ _
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
e1 : IsLUB (f '' {a, b}) (f b)
⊢ f a ∈ {f a, f b}

tactic: apply h
state_before: α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
⊢ IsLUB (f '' {a, b}) (f b)

tactic: exact Set.insert_nonempty _ _
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
⊢ Set.Nonempty {a, b}

tactic: exact directedOn_pair le_refl hab
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
⊢ DirectedOn (fun x x_1 => x ≤ x_1) {a, b}

tactic: rw [IsLUB, upperBounds_insert, upperBounds_singleton,
  Set.inter_eq_self_of_subset_right (Set.Ici_subset_Ici.mpr hab)]
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
⊢ IsLUB {a, b} b

tactic: exact isLeast_Ici
state_before: case a
α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝¹ : Preorder α
a✝ : α
inst✝ : Preorder β
f : α → β
h : ScottContinuous f
a b : α
hab : a ≤ b
⊢ IsLeast (Set.Ici b) b
Theorem: List.eraseP_cons_of_neg
File: Std/Data/List/Lemmas.lean

tactic: simp [eraseP_cons, h]
state_before: α : Type u_1
a : α
l : List α
p : α → Bool
h : ¬p a = true
⊢ eraseP p (a :: l) = a :: eraseP p l
Theorem: div_le_inv_mul_iff
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [div_eq_mul_inv, mul_inv_le_inv_mul_iff]
state_before: α : Type u
inst✝³ : Group α
inst✝² : LinearOrder α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
⊢ a / b ≤ a⁻¹ * b ↔ a ≤ b

tactic: exact
  ⟨fun h => not_lt.mp fun k => not_lt.mpr h (mul_lt_mul_of_lt_of_lt k k), fun h =>
    mul_le_mul' h h⟩
state_before: α : Type u
inst✝³ : Group α
inst✝² : LinearOrder α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
⊢ a * a ≤ b * b ↔ a ≤ b
Theorem: Complex.arg_neg_I
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: simp [arg, le_refl]
state_before: ⊢ arg (-I) = -(π / 2)
Theorem: Polynomial.cardPowDegree_isEuclidean
File: Mathlib/Data/Polynomial/Degree/CardPowDegree.lean

tactic: show cardPowDegree p < cardPowDegree q ↔ degree p < degree q
state_before: Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
⊢ ↑cardPowDegree p < ↑cardPowDegree q ↔ EuclideanDomain.r p q

tactic: simp only [cardPowDegree_apply]
state_before: Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
⊢ ↑cardPowDegree p < ↑cardPowDegree q ↔ degree p < degree q

tactic: split_ifs with hp hq hq
state_before: Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
⊢ ((if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) < if q = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree q) ↔
    degree p < degree q

tactic: simp only [hp, hq, lt_self_iff_false]
state_before: case inl.inl
Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
hp : p = 0
hq : q = 0
⊢ 0 < 0 ↔ degree p < degree q

tactic: simp only [hp, hq, degree_zero, Ne.def, bot_lt_iff_ne_bot, degree_eq_bot, pow_pos,
  not_false_iff]
state_before: case inl.inr
Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
hp : p = 0
hq : ¬q = 0
⊢ 0 < ↑(Fintype.card Fq) ^ natDegree q ↔ degree p < degree q

tactic: simp only [hp, hq, degree_zero, not_lt_bot, (pow_pos _).not_lt]
state_before: case inr.inl
Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
hp : ¬p = 0
hq : q = 0
⊢ ↑(Fintype.card Fq) ^ natDegree p < 0 ↔ degree p < degree q

tactic: rw [degree_eq_natDegree hp, degree_eq_natDegree hq, Nat.cast_withBot, Nat.cast_withBot,
  WithBot.coe_lt_coe, pow_lt_pow_iff]
state_before: case inr.inr
Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ ↑(Fintype.card Fq) ^ natDegree p < ↑(Fintype.card Fq) ^ natDegree q ↔ degree p < degree q

tactic: exact_mod_cast @Fintype.one_lt_card Fq _ _
state_before: case inr.inr
Fq : Type u_1
inst✝¹ : Field Fq
inst✝ : Fintype Fq
card_pos : 0 < Fintype.card Fq
pow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n
p q : Fq[X]
hp : ¬p = 0
hq : ¬q = 0
⊢ 1 < ↑(Fintype.card Fq)
Theorem: Nat.add_sub_assoc
File: src/lean/Init/Data/Nat/Basic.lean

tactic: cases Nat.le.dest h
state_before: m k : Nat
h : k ≤ m
n : Nat
⊢ n + m - k = n + (m - k)

tactic: rename_i l hl
state_before: case intro
m k : Nat
h : k ≤ m
n w✝ : Nat
h✝ : k + w✝ = m
⊢ n + m - k = n + (m - k)

tactic: rw [← hl, Nat.add_sub_cancel_left, Nat.add_comm k, ← Nat.add_assoc, Nat.add_sub_cancel]
state_before: case intro
m k : Nat
h : k ≤ m
n l : Nat
hl : k + l = m
⊢ n + m - k = n + (m - k)