tasksource/leandojo huggingface dataset:
Theorem: Subalgebra.bot_eq_top_iff_rank_eq_one
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [← rank_top, Subalgebra.rank_eq_one_iff, eq_comm]
state_before: K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝³ : Field F
inst✝² : Ring E
inst✝¹ : Algebra F E
inst✝ : Nontrivial E
⊢ ⊥ = ⊤ ↔ Module.rank F E = 1
Theorem: Quaternion.coeComplex_add
File: Mathlib/Analysis/Quaternion.lean

tactic: ext <;> simp
state_before: z w : ℂ
⊢ ↑(z + w) = ↑z + ↑w
Theorem: Nat.multinomial_insert
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: rw [choose_eq_factorial_div_factorial (le.intro rfl)]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ multinomial (insert a s) f = choose (f a + Finset.sum s f) (f a) * multinomial s f

tactic: simp only [multinomial, Nat.add_sub_cancel_left, Finset.sum_insert h, Finset.prod_insert h,
  Function.comp_apply]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ multinomial (insert a s) f = (f a + Finset.sum s f)! / ((f a)! * (f a + Finset.sum s f - f a)!) * multinomial s f

tactic: rw [div_mul_div_comm ((f a).factorial_mul_factorial_dvd_factorial_add (s.sum f))
    (prod_factorial_dvd_factorial_sum _ _),
  mul_comm (f a)! (s.sum f)!, mul_assoc, mul_comm _ (s.sum f)!,
  Nat.mul_div_mul_left _ _ (factorial_pos _)]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : ¬a ∈ s
⊢ (f a + ∑ i in s, f i)! / ((f a)! * ∏ i in s, (f i)!) =
    (f a + Finset.sum s f)! / ((f a)! * (Finset.sum s f)!) * ((∑ i in s, f i)! / ∏ i in s, (f i)!)
Theorem: MeasureTheory.Measure.ext_iff_of_biUnion_eq_univ
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← restrict_biUnion_congr hc, hs, restrict_univ, restrict_univ]
state_before: α : Type u_2
β : Type ?u.319831
γ : Type ?u.319834
δ : Type ?u.319837
ι : Type u_1
R : Type ?u.319843
R' : Type ?u.319846
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
S : Set ι
s : ι → Set α
hc : Set.Countable S
hs : (⋃ (i : ι) (_ : i ∈ S), s i) = univ
⊢ μ = ν ↔ ∀ (i : ι), i ∈ S → restrict μ (s i) = restrict ν (s i)
Theorem: IsLocalization.map_map
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [← map_comp_map (Q := Q) hy hl]
state_before: R : Type u_6
inst✝¹¹ : CommSemiring R
M : Submonoid R
S : Type u_5
inst✝¹⁰ : CommSemiring S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommSemiring P
inst✝⁷ : IsLocalization M S
g : R →+* P
hg : ∀ (y : { x // x ∈ M }), IsUnit (↑g ↑y)
T : Submonoid P
Q : Type u_4
inst✝⁶ : CommSemiring Q
hy : M ≤ Submonoid.comap g T
inst✝⁵ : Algebra P Q
inst✝⁴ : IsLocalization T Q
A : Type u_1
inst✝³ : CommSemiring A
U : Submonoid A
W : Type u_2
inst✝² : CommSemiring W
inst✝¹ : Algebra A W
inst✝ : IsLocalization U W
l : P →+* A
hl : T ≤ Submonoid.comap l U
x : S
⊢ ↑(map W l hl) (↑(map Q g hy) x) = ↑(map W (RingHom.comp l g) (_ : ∀ (x : R), x ∈ M → ↑g x ∈ Submonoid.comap l U)) x

tactic: rfl
state_before: R : Type u_6
inst✝¹¹ : CommSemiring R
M : Submonoid R
S : Type u_5
inst✝¹⁰ : CommSemiring S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommSemiring P
inst✝⁷ : IsLocalization M S
g : R →+* P
hg : ∀ (y : { x // x ∈ M }), IsUnit (↑g ↑y)
T : Submonoid P
Q : Type u_4
inst✝⁶ : CommSemiring Q
hy : M ≤ Submonoid.comap g T
inst✝⁵ : Algebra P Q
inst✝⁴ : IsLocalization T Q
A : Type u_1
inst✝³ : CommSemiring A
U : Submonoid A
W : Type u_2
inst✝² : CommSemiring W
inst✝¹ : Algebra A W
inst✝ : IsLocalization U W
l : P →+* A
hl : T ≤ Submonoid.comap l U
x : S
⊢ ↑(map W l hl) (↑(map Q g hy) x) = ↑(RingHom.comp (map W l hl) (map Q g hy)) x
Theorem: IsUnit.div_eq_iff
File: Mathlib/Algebra/Hom/Units.lean

tactic: rw [div_eq_mul_inv, h.mul_inv_eq_iff_eq_mul]
state_before: F : Type ?u.57354
G : Type ?u.57357
α : Type u_1
M : Type ?u.57363
N : Type ?u.57366
inst✝ : DivisionMonoid α
a b c : α
h : IsUnit b
⊢ a / b = c ↔ a = c * b
Theorem: geom_sum_Ico
File: Mathlib/Algebra/GeomSum.lean

tactic: simp only [sum_Ico_eq_sub _ hmn, geom_sum_eq hx, div_sub_div_same, sub_sub_sub_cancel_right]
state_before: α : Type u
inst✝ : DivisionRing α
x : α
hx : x ≠ 1
m n : ℕ
hmn : m ≤ n
⊢ ∑ i in Ico m n, x ^ i = (x ^ n - x ^ m) / (x - 1)
Theorem: Metric.cthickening_closure
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp_rw [cthickening, infEdist_closure]
state_before: ι : Sort ?u.131546
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ ε : ℝ
s t : Set α
x : α
⊢ cthickening δ (closure s) = cthickening δ s
Theorem: Multiset.Nodup.le_nsmul_iff_le
File: Mathlib/Data/Multiset/Dedup.lean

tactic: classical
  rw [← h.le_dedup_iff_le, Iff.comm, ← h.le_dedup_iff_le]
  simp [hn]
state_before: α : Type u_1
s t : Multiset α
n : ℕ
h : Nodup s
hn : n ≠ 0
⊢ s ≤ n • t ↔ s ≤ t

tactic: rw [← h.le_dedup_iff_le, Iff.comm, ← h.le_dedup_iff_le]
state_before: α : Type u_1
s t : Multiset α
n : ℕ
h : Nodup s
hn : n ≠ 0
⊢ s ≤ n • t ↔ s ≤ t

tactic: simp [hn]
state_before: α : Type u_1
s t : Multiset α
n : ℕ
h : Nodup s
hn : n ≠ 0
⊢ s ≤ Multiset.dedup t ↔ s ≤ Multiset.dedup (n • t)
Theorem: List.dlookup_dedupKeys
File: Mathlib/Data/List/Sigma.lean

tactic: induction' l with l_hd _ l_ih
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
⊢ dlookup a (dedupKeys l) = dlookup a l

tactic: rfl
state_before: case nil
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
⊢ dlookup a (dedupKeys []) = dlookup a []

case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l_hd : Sigma β
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
⊢ dlookup a (dedupKeys (l_hd :: tail✝)) = dlookup a (l_hd :: tail✝)

tactic: cases' l_hd with a' b
state_before: case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l_hd : Sigma β
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
⊢ dlookup a (dedupKeys (l_hd :: tail✝)) = dlookup a (l_hd :: tail✝)

tactic: by_cases h : a = a'
state_before: case cons.mk
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
a' : α
b : β a'
⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)

tactic: subst a'
state_before: case pos
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
a' : α
b : β a'
h : a = a'
⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)

tactic: rw [dedupKeys_cons, dlookup_kinsert, dlookup_cons_eq]
state_before: case pos
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
b : β a
⊢ dlookup a (dedupKeys ({ fst := a, snd := b } :: tail✝)) = dlookup a ({ fst := a, snd := b } :: tail✝)

tactic: rw [dedupKeys_cons, dlookup_kinsert_ne h, l_ih, dlookup_cons_ne]
state_before: case neg
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
a' : α
b : β a'
h : ¬a = a'
⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)

tactic: exact h
state_before: case neg.a
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
tail✝ : List (Sigma β)
l_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝
a' : α
b : β a'
h : ¬a = a'
⊢ a ≠ { fst := a', snd := b }.fst
Theorem: Setoid.classes_inj
File: Mathlib/Data/Setoid/Partition.lean

tactic: simp only [rel_iff_exists_classes, exists_prop, h]
state_before: α : Type u_1
r₁ r₂ : Setoid α
h : classes r₁ = classes r₂
a b : α
⊢ Rel r₁ a b ↔ Rel r₂ a b
Theorem: List.mem_foldr_permutationsAux2
File: Mathlib/Data/List/Permutation.lean

tactic: have :
  (∃ a : List α,
      a ∈ L ∧ ∃ l₁ l₂ : List α, ¬l₂ = nil ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔
    ∃ l₁ l₂ : List α, ¬l₂ = nil ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts) :=
  ⟨fun ⟨_, aL, l₁, l₂, l0, e, h⟩ => ⟨l₁, l₂, l0, e ▸ aL, h⟩, fun ⟨l₁, l₂, l0, aL, h⟩ =>
    ⟨_, aL, l₁, l₂, l0, rfl, h⟩⟩
state_before: α : Type u_1
β : Type ?u.21563
t : α
ts : List α
r L : List (List α)
l' : List α
⊢ l' ∈ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L ↔
    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts

tactic: rw [foldr_permutationsAux2]
state_before: α : Type u_1
β : Type ?u.21563
t : α
ts : List α
r L : List (List α)
l' : List α
this :
  (∃ a, a ∈ L ∧ ∃ l₁ l₂, ¬l₂ = [] ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔
    ∃ l₁ l₂, ¬l₂ = [] ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts)
⊢ l' ∈ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L ↔
    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts

tactic: simp only [mem_permutationsAux2', ← this, or_comm, and_left_comm, mem_append, mem_bind,
  append_assoc, cons_append, exists_prop]
state_before: α : Type u_1
β : Type ?u.21563
t : α
ts : List α
r L : List (List α)
l' : List α
this :
  (∃ a, a ∈ L ∧ ∃ l₁ l₂, ¬l₂ = [] ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔
    ∃ l₁ l₂, ¬l₂ = [] ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts)
⊢ l' ∈ (List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r ↔
    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts
Theorem: Primrec.of_equiv_symm
File: Mathlib/Computability/Primrec.lean

tactic: simp [Primrec.encode]
state_before: α : Type u_2
β✝ : Type ?u.27049
σ : Type ?u.27052
inst✝² : Primcodable α
inst✝¹ : Primcodable β✝
inst✝ : Primcodable σ
β : Type u_1
e : β ≃ α
this : Primcodable β := Primcodable.ofEquiv α e
⊢ Primrec fun a => encode (↑e (↑e.symm a))
Theorem: CategoryTheory.mono_to_simple_zero_of_not_iso
File: Mathlib/CategoryTheory/Simple.lean

tactic: classical
  by_contra h
  exact w (isIso_of_mono_of_nonzero h)
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : Mono f
w : IsIso f → False
⊢ f = 0

tactic: by_contra h
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : Mono f
w : IsIso f → False
⊢ f = 0

tactic: exact w (isIso_of_mono_of_nonzero h)
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
X Y : C
inst✝¹ : Simple Y
f : X ⟶ Y
inst✝ : Mono f
w : IsIso f → False
h : ¬f = 0
⊢ False
Theorem: Asymptotics.isBigOWith_zero
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simpa using mul_nonneg hc (norm_nonneg <| g' x)
state_before: α : Type u_1
β : Type ?u.251934
E : Type ?u.251937
F : Type ?u.251940
G : Type ?u.251943
E' : Type u_2
F' : Type u_3
G' : Type ?u.251952
E'' : Type ?u.251955
F'' : Type ?u.251958
G'' : Type ?u.251961
R : Type ?u.251964
R' : Type ?u.251967
𝕜 : Type ?u.251970
𝕜' : Type ?u.251973
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
hc : 0 ≤ c
x : α
⊢ x ∈ {x | (fun x => ‖0‖ ≤ c * ‖g' x‖) x}
Theorem: hasFTaylorSeriesUpTo_zero_iff
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: simp [hasFTaylorSeriesUpToOn_univ_iff.symm, continuous_iff_continuousOn_univ,
  hasFTaylorSeriesUpToOn_zero_iff]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ HasFTaylorSeriesUpTo 0 f p ↔ Continuous f ∧ ∀ (x : E), ContinuousMultilinearMap.uncurry0 (p x 0) = f x
Theorem: AbsoluteValue.IsAdmissible.exists_approx
File: Mathlib/NumberTheory/ClassNumber/AdmissibleAbsoluteValue.lean

tactic: let e := Fintype.equivFin ι
state_before: R : Type u_2
inst✝¹ : EuclideanDomain R
abv : AbsoluteValue R ℤ
ι : Type u_1
inst✝ : Fintype ι
ε : ℝ
hε : 0 < ε
b : R
hb : b ≠ 0
h : IsAdmissible abv
A : Fin (Nat.succ (IsAdmissible.card h ε ^ Fintype.card ι)) → ι → R
⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε

tactic: obtain ⟨i₀, i₁, ne, h⟩ := h.exists_approx_aux (Fintype.card ι) hε hb fun x y ↦ A x (e.symm y)
state_before: R : Type u_2
inst✝¹ : EuclideanDomain R
abv : AbsoluteValue R ℤ
ι : Type u_1
inst✝ : Fintype ι
ε : ℝ
hε : 0 < ε
b : R
hb : b ≠ 0
h : IsAdmissible abv
A : Fin (Nat.succ (IsAdmissible.card h ε ^ Fintype.card ι)) → ι → R
e : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι
⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε

tactic: refine' ⟨i₀, i₁, ne, fun k ↦ _⟩
state_before: case intro.intro.intro
R : Type u_2
inst✝¹ : EuclideanDomain R
abv : AbsoluteValue R ℤ
ι : Type u_1
inst✝ : Fintype ι
ε : ℝ
hε : 0 < ε
b : R
hb : b ≠ 0
h✝ : IsAdmissible abv
A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R
e : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι
i₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))
ne : i₀ ≠ i₁
h : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε
⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε

tactic: convert h (e k) <;> simp only [e.symm_apply_apply]
state_before: case intro.intro.intro
R : Type u_2
inst✝¹ : EuclideanDomain R
abv : AbsoluteValue R ℤ
ι : Type u_1
inst✝ : Fintype ι
ε : ℝ
hε : 0 < ε
b : R
hb : b ≠ 0
h✝ : IsAdmissible abv
A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R
e : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι
i₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))
ne : i₀ ≠ i₁
h : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε
k : ι
⊢ ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε
Theorem: singleton_div_ball
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp_rw [div_eq_mul_inv, inv_ball, singleton_mul_ball]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ {x} / ball y δ = ball (x / y) δ
Theorem: Finset.product_biUnion
File: Mathlib/Data/Finset/Prod.lean

tactic: classical simp_rw [product_eq_biUnion, biUnion_biUnion, image_biUnion]
state_before: α : Type u_2
β : Type u_3
γ : Type u_1
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
inst✝ : DecidableEq γ
s : Finset α
t : Finset β
f : α × β → Finset γ
⊢ Finset.biUnion (s ×ˢ t) f = Finset.biUnion s fun a => Finset.biUnion t fun b => f (a, b)

tactic: simp_rw [product_eq_biUnion, biUnion_biUnion, image_biUnion]
state_before: α : Type u_2
β : Type u_3
γ : Type u_1
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
inst✝ : DecidableEq γ
s : Finset α
t : Finset β
f : α × β → Finset γ
⊢ Finset.biUnion (s ×ˢ t) f = Finset.biUnion s fun a => Finset.biUnion t fun b => f (a, b)
Theorem: Metric.closure_subset_thickening
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [← cthickening_zero]
state_before: ι : Sort ?u.112602
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s t : Set α
x : α
δ : ℝ
δ_pos : 0 < δ
E : Set α
⊢ closure E ⊆ thickening δ E

tactic: exact cthickening_subset_thickening' δ_pos δ_pos E
state_before: ι : Sort ?u.112602
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s t : Set α
x : α
δ : ℝ
δ_pos : 0 < δ
E : Set α
⊢ cthickening 0 E ⊆ thickening δ E
Theorem: Multiset.card_sub
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [add_comm, ← card_add, tsub_add_cancel_of_le h]
state_before: α : Type u_1
β : Type ?u.162424
γ : Type ?u.162427
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
h : t ≤ s
⊢ ↑card s = ↑card t + ↑card (s - t)
Theorem: MvPolynomial.mem_ideal_of_coeff_mem_ideal
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: rw [as_sum p]
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
⊢ p ∈ I

tactic: suffices ∀ m ∈ p.support, monomial m (MvPolynomial.coeff m p) ∈ I by
  exact Submodule.sum_mem I this
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
⊢ ∑ v in support p, ↑(monomial v) (coeff v p) ∈ I

tactic: intro m _
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
⊢ ∀ (m : σ →₀ ℕ), m ∈ support p → ↑(monomial m) (coeff m p) ∈ I

tactic: rw [← mul_one (coeff m p), ← C_mul_monomial]
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
m : σ →₀ ℕ
a✝ : m ∈ support p
⊢ ↑(monomial m) (coeff m p) ∈ I

tactic: suffices C (coeff m p) ∈ I by exact I.mul_mem_right (monomial m 1) this
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
m : σ →₀ ℕ
a✝ : m ∈ support p
⊢ ↑C (coeff m p) * ↑(monomial m) 1 ∈ I

tactic: simpa [Ideal.mem_comap] using hcoe m
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
m : σ →₀ ℕ
a✝ : m ∈ support p
⊢ ↑C (coeff m p) ∈ I

tactic: exact Submodule.sum_mem I this
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
this : ∀ (m : σ →₀ ℕ), m ∈ support p → ↑(monomial m) (coeff m p) ∈ I
⊢ ∑ v in support p, ↑(monomial v) (coeff v p) ∈ I

tactic: exact I.mul_mem_right (monomial m 1) this
state_before: R : Type u
S : Type ?u.952181
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal (MvPolynomial σ R)
p : MvPolynomial σ R
hcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I
m : σ →₀ ℕ
a✝ : m ∈ support p
this : ↑C (coeff m p) ∈ I
⊢ ↑C (coeff m p) * ↑(monomial m) 1 ∈ I
Theorem: norm_inf_sub_inf_le_add_norm
File: Mathlib/Analysis/Normed/Order/Lattice.lean

tactic: rw [← norm_abs_eq_norm (a - c), ← norm_abs_eq_norm (b - d)]
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ ‖a ⊓ b - c ⊓ d‖ ≤ ‖a - c‖ + ‖b - d‖

tactic: refine' le_trans (solid _) (norm_add_le (|a - c|) (|b - d|))
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ ‖a ⊓ b - c ⊓ d‖ ≤ ‖abs (a - c)‖ + ‖abs (b - d)‖

tactic: rw [abs_of_nonneg (|a - c| + |b - d|) (add_nonneg (abs_nonneg (a - c)) (abs_nonneg (b - d)))]
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (a ⊓ b - c ⊓ d) ≤ abs (abs (a - c) + abs (b - d))

tactic: rw [sub_add_sub_cancel]
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (a ⊓ b - c ⊓ d) = abs (a ⊓ b - c ⊓ b + (c ⊓ b - c ⊓ d))

tactic: apply add_le_add
state_before: α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (a ⊓ b - c ⊓ b) + abs (c ⊓ b - c ⊓ d) ≤ abs (a - c) + abs (b - d)

tactic: exact abs_inf_sub_inf_le_abs _ _ _
state_before: case h₁
α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (a ⊓ b - c ⊓ b) ≤ abs (a - c)

tactic: rw [@inf_comm _ _ c, @inf_comm _ _ c]
state_before: case h₂
α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (c ⊓ b - c ⊓ d) ≤ abs (b - d)

tactic: exact abs_inf_sub_inf_le_abs _ _ _
state_before: case h₂
α : Type u_1
inst✝ : NormedLatticeAddCommGroup α
a b c d : α
⊢ abs (b ⊓ c - d ⊓ c) ≤ abs (b - d)
Theorem: Finsupp.prod_of_support_subset
File: Mathlib/Algebra/BigOperators/Finsupp.lean

tactic: refine Finset.prod_subset hs fun x hxs hx => h x hxs ▸ (congr_arg (g x) ?_)
state_before: α : Type u_1
ι : Type ?u.18979
γ : Type ?u.18982
A : Type ?u.18985
B : Type ?u.18988
C : Type ?u.18991
inst✝⁵ : AddCommMonoid A
inst✝⁴ : AddCommMonoid B
inst✝³ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s✝ : Finset α
f✝ : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.22121
M : Type u_2
M' : Type ?u.22127
N : Type u_3
P : Type ?u.22133
G : Type ?u.22136
H : Type ?u.22139
R : Type ?u.22142
S : Type ?u.22145
inst✝² : Zero M
inst✝¹ : Zero M'
inst✝ : CommMonoid N
f : α →₀ M
s : Finset α
hs : f.support ⊆ s
g : α → M → N
h : ∀ (i : α), i ∈ s → g i 0 = 1
⊢ prod f g = ∏ x in s, g x (↑f x)

tactic: exact not_mem_support_iff.1 hx
state_before: α : Type u_1
ι : Type ?u.18979
γ : Type ?u.18982
A : Type ?u.18985
B : Type ?u.18988
C : Type ?u.18991
inst✝⁵ : AddCommMonoid A
inst✝⁴ : AddCommMonoid B
inst✝³ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s✝ : Finset α
f✝ : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x✝ : γ
β : Type ?u.22121
M : Type u_2
M' : Type ?u.22127
N : Type u_3
P : Type ?u.22133
G : Type ?u.22136
H : Type ?u.22139
R : Type ?u.22142
S : Type ?u.22145
inst✝² : Zero M
inst✝¹ : Zero M'
inst✝ : CommMonoid N
f : α →₀ M
s : Finset α
hs : f.support ⊆ s
g : α → M → N
h : ∀ (i : α), i ∈ s → g i 0 = 1
x : α
hxs : x ∈ s
hx : ¬x ∈ f.support
⊢ ↑f x = 0
Theorem: Even.pow_pos_iff
File: Mathlib/Algebra/Parity.lean

tactic: rw [ha, zero_pow h₀] at h
state_before: F : Type ?u.112052
α : Type ?u.112055
β : Type ?u.112058
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
hn : Even n
h₀ : 0 < n
h : 0 < a ^ n
ha : a = 0
⊢ False

tactic: exact lt_irrefl 0 h
state_before: F : Type ?u.112052
α : Type ?u.112055
β : Type ?u.112058
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
hn : Even n
h₀ : 0 < n
h : 0 < 0
ha : a = 0
⊢ False
Theorem: Filter.Germ.const_max
File: Mathlib/Order/Filter/FilterProduct.lean

tactic: rw [max_def, map₂_const]
state_before: α : Type u
β : Type v
φ : Ultrafilter α
inst✝ : LinearOrder β
x y : β
⊢ ↑(max x y) = max ↑x ↑y
Theorem: Rat.mul_self_den
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rw [Rat.mul_den, Int.natAbs_mul, Nat.coprime.gcd_eq_one, Nat.div_one]
state_before: q : ℚ
⊢ (q * q).den = q.den * q.den

tactic: exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)
state_before: q : ℚ
⊢ Nat.coprime (Int.natAbs q.num * Int.natAbs q.num) (q.den * q.den)