tasksource/leandojo huggingface dataset:
Theorem: Multiset.sum_map_singleton
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: simp
state_before: ι : Type ?u.159176
α : Type u_1
β : Type ?u.159182
γ : Type ?u.159185
s : Multiset α
⊢ sum (map (fun a => {a}) 0) = 0

tactic: simp
state_before: ι : Type ?u.159176
α : Type u_1
β : Type ?u.159182
γ : Type ?u.159185
s : Multiset α
⊢ ∀ ⦃a : α⦄ {s : Multiset α}, sum (map (fun a => {a}) s) = s → sum (map (fun a => {a}) (a ::ₘ s)) = a ::ₘ s
Theorem: Isometry.right_inv
File: Mathlib/Topology/MetricSpace/Isometry.lean

tactic: rw [← h, hg _, hg _]
state_before: ι : Type ?u.5264
α : Type u
β : Type v
γ : Type w
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
f✝ : α → β
x✝ y✝ z : α
s : Set α
f : α → β
g : β → α
h : Isometry f
hg : Function.RightInverse g f
x y : β
⊢ edist (g x) (g y) = edist x y
Theorem: inf_sdiff_inf
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [inf_comm, inf_inf_sdiff]
state_before: α : Type u
β : Type ?u.1013
w x✝ y✝ z : α
inst✝ : GeneralizedBooleanAlgebra α
x y : α
⊢ x \ y ⊓ (x ⊓ y) = ⊥
Theorem: cycleType_finRotate
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: rw [isCycle_finRotate.cycleType, support_finRotate, ← Fintype.card, Fintype.card_fin]
state_before: n : ℕ
⊢ cycleType (finRotate (n + 2)) = {n + 2}

tactic: rfl
state_before: n : ℕ
⊢ ↑[n + 2] = {n + 2}
Theorem: ZMod.nat_cast_natAbs_valMinAbs
File: Mathlib/Data/ZMod/Basic.lean

tactic: have : (a.val : ℤ) - n ≤ 0 := by
  erw [sub_nonpos, Int.ofNat_le]
  exact a.val_le
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
⊢ ↑(Int.natAbs (valMinAbs a)) = if val a ≤ n / 2 then a else -a

tactic: rw [valMinAbs_def_pos]
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
this : ↑(val a) - ↑n ≤ 0
⊢ ↑(Int.natAbs (valMinAbs a)) = if val a ≤ n / 2 then a else -a

tactic: split_ifs
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
this : ↑(val a) - ↑n ≤ 0
⊢ ↑(Int.natAbs (if val a ≤ n / 2 then ↑(val a) else ↑(val a) - ↑n)) = if val a ≤ n / 2 then a else -a

tactic: erw [sub_nonpos, Int.ofNat_le]
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
⊢ ↑(val a) - ↑n ≤ 0

tactic: exact a.val_le
state_before: n : ℕ
inst✝ : NeZero n
a : ZMod n
⊢ val a ≤ n

tactic: rw [Int.natAbs_ofNat, nat_cast_zmod_val]
state_before: case inl
n : ℕ
inst✝ : NeZero n
a : ZMod n
this : ↑(val a) - ↑n ≤ 0
h✝ : val a ≤ n / 2
⊢ ↑(Int.natAbs ↑(val a)) = a

tactic: rw [← Int.cast_ofNat, Int.ofNat_natAbs_of_nonpos this, Int.cast_neg, Int.cast_sub,
  Int.cast_ofNat, Int.cast_ofNat, nat_cast_self, sub_zero, nat_cast_zmod_val]
state_before: case inr
n : ℕ
inst✝ : NeZero n
a : ZMod n
this : ↑(val a) - ↑n ≤ 0
h✝ : ¬val a ≤ n / 2
⊢ ↑(Int.natAbs (↑(val a) - ↑n)) = -a
Theorem: Real.Angle.two_nsmul_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: convert two_nsmul_eq_iff <;> simp
state_before: θ : Angle
⊢ 2 • θ = 0 ↔ θ = 0 ∨ θ = ↑π
Theorem: Ideal.not_isPrime_iff
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: simp_rw [Ideal.isPrime_iff, not_and_or, Ne.def, Classical.not_not, not_forall, not_or]
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
⊢ ¬IsPrime I ↔ I = ⊤ ∨ ∃ x _hx y _hy, x * y ∈ I

tactic: exact
  or_congr Iff.rfl
    ⟨fun ⟨x, y, hxy, hx, hy⟩ => ⟨x, hx, y, hy, hxy⟩, fun ⟨x, hx, y, hy, hxy⟩ =>
      ⟨x, y, hxy, hx, hy⟩⟩
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I✝ : Ideal α
a b : α
I : Ideal α
⊢ (I = ⊤ ∨ ∃ x x_1 h, ¬x ∈ I ∧ ¬x_1 ∈ I) ↔ I = ⊤ ∨ ∃ x _hx y _hy, x * y ∈ I
Theorem: AlgebraicGeometry.RingedSpace.basicOpen_of_isUnit
File: Mathlib/AlgebraicGeometry/RingedSpace.lean

tactic: apply le_antisymm
state_before: X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj U.op)
hf : IsUnit f
⊢ basicOpen X f = U

tactic: intro x hx
state_before: case a
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj U.op)
hf : IsUnit f
⊢ U ≤ basicOpen X f

tactic: erw [X.mem_basicOpen f (⟨x, hx⟩ : U)]
state_before: case a
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj U.op)
hf : IsUnit f
x : ↑↑X.toPresheafedSpace
hx : x ∈ ↑U
⊢ x ∈ ↑(basicOpen X f)

tactic: exact RingHom.isUnit_map _ hf
state_before: case a
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj U.op)
hf : IsUnit f
x : ↑↑X.toPresheafedSpace
hx : x ∈ ↑U
⊢ IsUnit (↑(germ X.presheaf { val := x, property := hx }) f)

tactic: exact X.basicOpen_le f
state_before: case a
X : RingedSpace
U : Opens ↑↑X.toPresheafedSpace
f : ↑(X.presheaf.obj U.op)
hf : IsUnit f
⊢ basicOpen X f ≤ U
Theorem: intervalIntegrable_iff'
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: rw [intervalIntegrable_iff, ← Icc_min_max, uIoc, integrableOn_Icc_iff_integrableOn_Ioc]
state_before: ι : Type ?u.578469
𝕜 : Type ?u.578472
E : Type u_1
F : Type ?u.578478
A : Type ?u.578481
inst✝¹ : NormedAddCommGroup E
f : ℝ → E
a b : ℝ
μ : MeasureTheory.Measure ℝ
inst✝ : NoAtoms μ
⊢ IntervalIntegrable f μ a b ↔ IntegrableOn f [[a, b]]
Theorem: linearIndependent_fin_cons
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: rw [← linearIndependent_equiv (finSuccEquiv n).symm, linearIndependent_option]
state_before: ι : Type u'
ι' : Type ?u.1242248
R : Type ?u.1242251
K : Type u_1
M : Type ?u.1242257
M' : Type ?u.1242260
M'' : Type ?u.1242263
V : Type u
V' : Type ?u.1242268
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v✝ : ι → V
s t : Set V
x y z : V
n : ℕ
v : Fin n → V
⊢ LinearIndependent K (Fin.cons x v) ↔ LinearIndependent K v ∧ ¬x ∈ span K (range v)

tactic: exact Iff.rfl
state_before: ι : Type u'
ι' : Type ?u.1242248
R : Type ?u.1242251
K : Type u_1
M : Type ?u.1242257
M' : Type ?u.1242260
M'' : Type ?u.1242263
V : Type u
V' : Type ?u.1242268
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v✝ : ι → V
s t : Set V
x y z : V
n : ℕ
v : Fin n → V
⊢ LinearIndependent K ((Fin.cons x v ∘ ↑(finSuccEquiv n).symm) ∘ some) ∧
      ¬(Fin.cons x v ∘ ↑(finSuccEquiv n).symm) none ∈ span K (range ((Fin.cons x v ∘ ↑(finSuccEquiv n).symm) ∘ some)) ↔
    LinearIndependent K v ∧ ¬x ∈ span K (range v)
Theorem: Ordinal.add_sub_cancel_of_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
state_before: α : Type ?u.129526
β : Type ?u.129529
γ : Type ?u.129532
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h : b ≤ a
⊢ b + (a - b) ≤ a

tactic: simp only [e, add_zero, h]
state_before: case inl
α : Type ?u.129526
β : Type ?u.129529
γ : Type ?u.129532
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h : b ≤ a
e : a - b = 0
⊢ b + (a - b) ≤ a

tactic: rw [e, add_succ, succ_le_iff, ← lt_sub, e]
state_before: case inr.inl.intro
α : Type ?u.129526
β : Type ?u.129529
γ : Type ?u.129532
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h : b ≤ a
c : Ordinal
e : a - b = succ c
⊢ b + (a - b) ≤ a

tactic: exact lt_succ c
state_before: case inr.inl.intro
α : Type ?u.129526
β : Type ?u.129529
γ : Type ?u.129532
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h : b ≤ a
c : Ordinal
e : a - b = succ c
⊢ c < succ c

tactic: exact (add_le_of_limit l).2 fun c l => (lt_sub.1 l).le
state_before: case inr.inr
α : Type ?u.129526
β : Type ?u.129529
γ : Type ?u.129532
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
h : b ≤ a
l : IsLimit (a - b)
⊢ b + (a - b) ≤ a
Theorem: Finpartition.indiscrete_isEquipartition
File: Mathlib/Order/Partition/Equipartition.lean

tactic: rw [IsEquipartition, indiscrete_parts, coe_singleton]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
hs : s ≠ ∅
⊢ IsEquipartition (indiscrete hs)

tactic: exact Set.equitableOn_singleton s _
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
hs : s ≠ ∅
⊢ Set.EquitableOn {s} Finset.card
Theorem: MeasureTheory.Lp.mem_Lp_const_smul
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [mem_Lp_iff_snorm_lt_top, snorm_congr_ae (AEEqFun.coeFn_smul _ _)]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.470041
G : Type ?u.470044
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_3
𝕜' : Type ?u.470082
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : { x // x ∈ Lp E p }
⊢ c • ↑f ∈ Lp E p

tactic: refine' (snorm_const_smul_le _ _).trans_lt _
state_before: α : Type u_1
E : Type u_2
F : Type ?u.470041
G : Type ?u.470044
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_3
𝕜' : Type ?u.470082
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : { x // x ∈ Lp E p }
⊢ snorm (c • ↑↑f) p μ < ⊤

tactic: rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_lt_top_iff]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.470041
G : Type ?u.470044
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_3
𝕜' : Type ?u.470082
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : { x // x ∈ Lp E p }
⊢ ‖c‖₊ • snorm (↑↑f) p μ < ⊤

tactic: exact Or.inl ⟨ENNReal.coe_lt_top, f.prop⟩
state_before: α : Type u_1
E : Type u_2
F : Type ?u.470041
G : Type ?u.470044
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_3
𝕜' : Type ?u.470082
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : { x // x ∈ Lp E p }
⊢ ↑‖c‖₊ < ⊤ ∧ snorm (↑↑f) p μ < ⊤ ∨ ↑‖c‖₊ = 0 ∨ snorm (↑↑f) p μ = 0
Theorem: List.foldl_map'
File: Mathlib/Data/List/Basic.lean

tactic: induction l generalizing a
state_before: ι : Type ?u.234160
α✝ : Type u
β✝ : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α✝
α β : Type u
g : α → β
f : α → α → α
f' : β → β → β
a : α
l : List α
h : ∀ (x y : α), f' (g x) (g y) = g (f x y)
⊢ foldl f' (g a) (map g l) = g (foldl f a l)

tactic: simp
state_before: case nil
ι : Type ?u.234160
α✝ : Type u
β✝ : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α✝
α β : Type u
g : α → β
f : α → α → α
f' : β → β → β
h : ∀ (x y : α), f' (g x) (g y) = g (f x y)
a : α
⊢ foldl f' (g a) (map g []) = g (foldl f a [])

tactic: simp [*, h]
state_before: case cons
ι : Type ?u.234160
α✝ : Type u
β✝ : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α✝
α β : Type u
g : α → β
f : α → α → α
f' : β → β → β
h : ∀ (x y : α), f' (g x) (g y) = g (f x y)
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ (a : α), foldl f' (g a) (map g tail✝) = g (foldl f a tail✝)
a : α
⊢ foldl f' (g a) (map g (head✝ :: tail✝)) = g (foldl f a (head✝ :: tail✝))
Theorem: HilbertBasis.finite_spans_dense
File: Mathlib/Analysis/InnerProductSpace/l2Space.lean

tactic: simp_rw [← Submodule.span_iUnion]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type ?u.887976
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) ≤
    topologicalClosure
      (⨆ (J : Finset ι), span 𝕜 ↑(Finset.image (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) J))

tactic: exact topologicalClosure_mono (span_mono <| Set.range_subset_iff.mpr fun i =>
  Set.mem_iUnion_of_mem {i} <| Finset.mem_coe.mpr <| Finset.mem_image_of_mem _ <|
  Finset.mem_singleton_self i)
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type ?u.887976
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) ≤
    topologicalClosure
      (span 𝕜 (⋃ (i : Finset ι), ↑(Finset.image (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)))
Theorem: ZNum.mod_to_int
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← Num.to_nat_to_int, cast_pos, Num.mod_to_nat, ← PosNum.to_nat_to_int, abs_to_nat]
state_before: n : PosNum
d : ZNum
⊢ ↑(Num.pos n % abs d) = ↑(pos n) % ↑d

tactic: rfl
state_before: n : PosNum
d : ZNum
⊢ ↑(↑(Num.pos n) % natAbs ↑d) = ↑↑n % ↑d

tactic: rw [← Num.to_nat_to_int, cast_neg, ← Num.to_nat_to_int, Num.succ_to_nat, Num.mod_to_nat,
    abs_to_nat, ← Int.subNatNat_eq_coe, n.to_int_eq_succ_pred]
state_before: n : PosNum
d : ZNum
⊢ ↑(abs d) - ↑(Num.succ (PosNum.pred' n % abs d)) = ↑(neg n) % ↑d

tactic: rfl
state_before: n : PosNum
d : ZNum
⊢ subNatNat (natAbs ↑d) (↑(PosNum.pred' n) % natAbs ↑d + 1) = -(↑↑(PosNum.pred' n) + 1) % ↑d
Theorem: NonarchAddGroupSeminorm.smul_sup
File: Mathlib/Analysis/Normed/Group/Seminorm.lean

tactic: simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝ≥0 r (_ : ℝ)] using
  mul_max_of_nonneg x y (r • (1 : ℝ≥0) : ℝ≥0).coe_nonneg
state_before: ι : Type ?u.197400
R : Type u_2
R' : Type ?u.197406
E : Type u_1
F : Type ?u.197412
G : Type ?u.197415
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p q : NonarchAddGroupSeminorm E
x y : ℝ
⊢ r • max x y = max (r • x) (r • y)
Theorem: padicNormE.eq_padicNorm
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: dsimp [norm]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
⊢ ‖↑q‖ = ↑(padicNorm p q)

tactic: rw [← padicNormE.eq_padic_norm']
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
⊢ ↑(↑padicNormE ↑q) = ↑(padicNorm p q)
Theorem: BddAbove.bddBelow_image2_of_bddAbove
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
h₀ : ∀ (b : β), Antitone (swap f b)
h₁ : ∀ (a : α), Monotone (f a)
⊢ BddAbove s → BddBelow t → BddBelow (Set.image2 f s t)

tactic: exact ⟨f a b, mem_lowerBounds_image2_of_mem_lowerBounds_of_mem_lowerBounds h₀ h₁ ha hb⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a✝ : α
b✝ : β
h₀ : ∀ (b : β), Antitone (swap f b)
h₁ : ∀ (a : α), Monotone (f a)
a : α
ha : a ∈ upperBounds s
b : β
hb : b ∈ lowerBounds t
⊢ BddBelow (Set.image2 f s t)
Theorem: nonempty_preirreducible_inter
File: Mathlib/Topology/SubsetProperties.lean

tactic: simpa only [univ_inter, univ_subset_iff] using
  @PreirreducibleSpace.isPreirreducible_univ α _ _ s t
state_before: α : Type u
β : Type v
ι : Type ?u.187622
π : ι → Type ?u.187627
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : PreirreducibleSpace α
s t : Set α
⊢ IsOpen s → IsOpen t → Set.Nonempty s → Set.Nonempty t → Set.Nonempty (s ∩ t)
Theorem: padicNorm.zero_of_padicNorm_eq_zero
File: Mathlib/NumberTheory/Padics/PadicNorm.lean

tactic: apply by_contradiction
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : padicNorm p q = 0
⊢ q = 0

tactic: intro hq
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : padicNorm p q = 0
⊢ ¬q = 0 → False

tactic: unfold padicNorm at h
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : padicNorm p q = 0
hq : ¬q = 0
⊢ False

tactic: rw [if_neg hq] at h
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : (if q = 0 then 0 else ↑p ^ (-padicValRat p q)) = 0
hq : ¬q = 0
⊢ False

tactic: apply absurd h
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : ↑p ^ (-padicValRat p q) = 0
hq : ¬q = 0
⊢ False

tactic: apply zpow_ne_zero_of_ne_zero
state_before: case a
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : ↑p ^ (-padicValRat p q) = 0
hq : ¬q = 0
⊢ ¬↑p ^ (-padicValRat p q) = 0

tactic: exact_mod_cast hp.1.ne_zero
state_before: case a.ha
p : ℕ
hp : Fact (Nat.Prime p)
q : ℚ
h : ↑p ^ (-padicValRat p q) = 0
hq : ¬q = 0
⊢ ↑p ≠ 0
Theorem: mulSalemSpencer_mul_right_iff
File: Mathlib/Combinatorics/Additive/SalemSpencer.lean

tactic: rw [mul_mul_mul_comm, h, mul_mul_mul_comm]
state_before: F : Type ?u.87422
α : Type u_1
β : Type ?u.87428
𝕜 : Type ?u.87431
E : Type ?u.87434
inst✝ : CancelCommMonoid α
s : Set α
a : α
hs : MulSalemSpencer ((fun x => x * a) '' s)
b c d : α
hb : b ∈ s
hc : c ∈ s
hd : d ∈ s
h : b * c = d * d
⊢ b * a * (c * a) = d * a * (d * a)
Theorem: PiNat.isOpen_cylinder
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: rw [PiNat.cylinder_eq_pi]
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
x : (n : ℕ) → E n
n : ℕ
⊢ IsOpen (cylinder x n)

tactic: exact isOpen_set_pi (Finset.range n).finite_toSet fun a _ => isOpen_discrete _
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
x : (n : ℕ) → E n
n : ℕ
⊢ IsOpen (Set.pi ↑(Finset.range n) fun i => {x i})
Theorem: ne₂₃_of_not_collinear
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rintro rfl
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.309152
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ : P
h : ¬Collinear k {p₁, p₂, p₃}
⊢ p₂ ≠ p₃

tactic: simp [collinear_pair] at h
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.309152
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ : P
h : ¬Collinear k {p₁, p₂, p₂}
⊢ False
Theorem: Group.ext
File: Mathlib/Algebra/Group/Ext.lean

tactic: let f : @MonoidHom G G g₁.toMulOneClass g₂.toMulOneClass :=
  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁)
    (fun x y => congr_fun (congr_fun h_mul x) y)
state_before: G : Type u_1
g₁ g₂ : Group G
h_mul : Mul.mul = Mul.mul
h₁ : One.one = One.one
⊢ g₁ = g₂

tactic: exact
  Group.toDivInvMonoid_injective
    (DivInvMonoid.ext h_mul
      (funext <| @MonoidHom.map_inv G G g₁ g₂.toDivisionMonoid f))
state_before: G : Type u_1
g₁ g₂ : Group G
h_mul : Mul.mul = Mul.mul
h₁ : One.one = One.one
f : G →* G := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : G), Mul.mul x y = Mul.mul x y) }
⊢ g₁ = g₂
Theorem: Finset.card_Icc_finset
File: Mathlib/Data/Finset/Interval.lean

tactic: rw [← card_sdiff h, ← card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
⊢ card (Icc s t) = 2 ^ (card t - card s)

tactic: rintro u hu v hv (huv : s ⊔ u = s ⊔ v)
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
⊢ Set.InjOn ((fun x x_1 => x ∪ x_1) s) ↑(powerset (t \ s))

tactic: rw [mem_coe, mem_powerset] at hu hv
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
hu : u ∈ ↑(powerset (t \ s))
v : Finset α
hv : v ∈ ↑(powerset (t \ s))
huv : s ⊔ u = s ⊔ v
⊢ u = v

tactic: rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
  (disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
h : s ⊆ t
u : Finset α
hu : u ⊆ t \ s
v : Finset α
hv : v ⊆ t \ s
huv : s ⊔ u = s ⊔ v
⊢ u = v
Theorem: Filter.frequently_sup
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [Filter.Frequently, eventually_sup, not_and_or]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.173522
ι : Sort x
p : α → Prop
f g : Filter α
⊢ (∃ᶠ (x : α) in f ⊔ g, p x) ↔ (∃ᶠ (x : α) in f, p x) ∨ ∃ᶠ (x : α) in g, p x
Theorem: CategoryTheory.Groupoid.Free.congr_reverse_comp
File: Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean

tactic: nth_rw 2 [← Quiver.Path.reverse_reverse p]
state_before: V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
p : X ⟶ Y
⊢ Quot.mk (Quotient.CompClosure redStep) (Quiver.Path.reverse p ≫ p) = Quot.mk (Quotient.CompClosure redStep) (𝟙 Y)

tactic: apply congr_comp_reverse
state_before: V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
p : X ⟶ Y
⊢ Quot.mk (Quotient.CompClosure redStep) (Quiver.Path.reverse p ≫ Quiver.Path.reverse (Quiver.Path.reverse p)) =
    Quot.mk (Quotient.CompClosure redStep) (𝟙 Y)
Theorem: Finsupp.inner_sum
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: convert _root_.inner_sum (𝕜 := 𝕜) l.support (fun a => l a • v a) x
state_before: 𝕜 : Type u_2
E : Type u_3
F : Type ?u.1474372
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
l : ι →₀ 𝕜
v : ι → E
x : E
⊢ inner x (sum l fun i a => a • v i) = sum l fun i a => a • inner x (v i)

tactic: simp only [inner_smul_right, Finsupp.sum, smul_eq_mul]
state_before: case h.e'_3
𝕜 : Type u_2
E : Type u_3
F : Type ?u.1474372
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
ι : Type u_1
l : ι →₀ 𝕜
v : ι → E
x : E
⊢ (sum l fun i a => a • inner x (v i)) = ∑ i in l.support, inner x (↑l i • v i)
Theorem: AlgebraicTopology.DoldKan.comp_P_eq_self_iff
File: Mathlib/AlgebraicTopology/DoldKan/Projections.lean

tactic: constructor
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
⊢ φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ ↔ HigherFacesVanish q φ

tactic: intro hφ
state_before: case mp
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
⊢ φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ → HigherFacesVanish q φ

tactic: rw [← hφ]
state_before: case mp
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
hφ : φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ
⊢ HigherFacesVanish q φ

tactic: apply HigherFacesVanish.of_comp
state_before: case mp
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
hφ : φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ
⊢ HigherFacesVanish q (φ ≫ HomologicalComplex.Hom.f (P q) (n + 1))

tactic: apply HigherFacesVanish.of_P
state_before: case mp.v
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
hφ : φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ
⊢ HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (n + 1))

tactic: exact HigherFacesVanish.comp_P_eq_self
state_before: case mpr
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
⊢ HigherFacesVanish q φ → φ ≫ HomologicalComplex.Hom.f (P q) (n + 1) = φ