tasksource/leandojo huggingface dataset:
Theorem: PowerSeries.order_add_of_order_eq
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: refine' le_antisymm _ (le_order_add _ _)
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
⊢ order (φ + ψ) = order φ ⊓ order ψ

tactic: by_cases H₁ : order φ < order ψ
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
⊢ order (φ + ψ) ≤ order φ ⊓ order ψ

tactic: by_cases H₂ : order ψ < order φ
state_before: case neg
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
H₁ : ¬order φ < order ψ
⊢ order (φ + ψ) ≤ order φ ⊓ order ψ

tactic: exfalso
state_before: case neg
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
H₁ : ¬order φ < order ψ
H₂ : ¬order ψ < order φ
⊢ order (φ + ψ) ≤ order φ ⊓ order ψ

tactic: exact h (le_antisymm (not_lt.1 H₂) (not_lt.1 H₁))
state_before: case neg.h
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
H₁ : ¬order φ < order ψ
H₂ : ¬order ψ < order φ
⊢ False

tactic: apply order_add_of_order_eq.aux _ _ h H₁
state_before: case pos
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
H₁ : order φ < order ψ
⊢ order (φ + ψ) ≤ order φ ⊓ order ψ

tactic: simpa only [add_comm, inf_comm] using order_add_of_order_eq.aux _ _ h.symm H₂
state_before: case pos
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : PowerSeries R
h : order φ ≠ order ψ
H₁ : ¬order φ < order ψ
H₂ : order ψ < order φ
⊢ order (φ + ψ) ≤ order φ ⊓ order ψ
Theorem: NormedSpace.vonNBornology_eq
File: Mathlib/Analysis/LocallyConvex/Bounded.lean

tactic: rw [Bornology.ext_iff_isBounded]
state_before: 𝕜 : Type u_2
𝕜' : Type ?u.259865
E : Type u_1
E' : Type ?u.259871
F : Type ?u.259874
ι : Type ?u.259877
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
⊢ Bornology.vonNBornology 𝕜 E = PseudoMetricSpace.toBornology

tactic: intro s
state_before: 𝕜 : Type u_2
𝕜' : Type ?u.259865
E : Type u_1
E' : Type ?u.259871
F : Type ?u.259874
ι : Type ?u.259877
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
⊢ ∀ (s : Set E), Bornology.IsBounded s ↔ Bornology.IsBounded s

tactic: rw [Bornology.isBounded_iff_isVonNBounded]
state_before: 𝕜 : Type u_2
𝕜' : Type ?u.259865
E : Type u_1
E' : Type ?u.259871
F : Type ?u.259874
ι : Type ?u.259877
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : Set E
⊢ Bornology.IsBounded s ↔ Bornology.IsBounded s

tactic: exact isVonNBounded_iff 𝕜 E s
state_before: 𝕜 : Type u_2
𝕜' : Type ?u.259865
E : Type u_1
E' : Type ?u.259871
F : Type ?u.259874
ι : Type ?u.259877
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : Set E
⊢ Bornology.IsVonNBounded 𝕜 s ↔ Bornology.IsBounded s
Theorem: and_and_left
File: Std/Logic.lean

tactic: rw [and_and_and_comm, and_self]
state_before: a b c : Prop
⊢ a ∧ b ∧ c ↔ (a ∧ b) ∧ a ∧ c
Theorem: ContinuousMap.continuous_isUnit_unit
File: Mathlib/Topology/ContinuousFunction/Units.lean

tactic: refine'
  continuous_induced_rng.2
    (Continuous.prod_mk f.continuous
      (MulOpposite.continuous_op.comp (continuous_iff_continuousAt.mpr fun x => _)))
state_before: X : Type u_1
M : Type ?u.349183
R : Type u_2
𝕜 : Type ?u.349189
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
⊢ Continuous fun x => IsUnit.unit (_ : IsUnit (↑f x))

tactic: have := NormedRing.inverse_continuousAt (h x).unit
state_before: X : Type u_1
M : Type ?u.349183
R : Type u_2
𝕜 : Type ?u.349189
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x

tactic: simp only
state_before: X : Type u_1
M : Type ?u.349183
R : Type u_2
𝕜 : Type ?u.349189
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))
⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x

tactic: simp only [← Ring.inverse_unit, IsUnit.unit_spec] at this ⊢
state_before: X : Type u_1
M : Type ?u.349183
R : Type u_2
𝕜 : Type ?u.349189
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))
⊢ ContinuousAt (fun x => ↑(IsUnit.unit (_ : IsUnit (↑f x)))⁻¹) x

tactic: exact this.comp (f.continuousAt x)
state_before: X : Type u_1
M : Type ?u.349183
R : Type u_2
𝕜 : Type ?u.349189
inst✝² : TopologicalSpace X
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
f : C(X, R)
h : ∀ (x : X), IsUnit (↑f x)
x : X
this : ContinuousAt Ring.inverse (↑f x)
⊢ ContinuousAt (fun x => Ring.inverse (↑f x)) x
Theorem: mul_eq_mul_right_iff
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: by_cases hc : c = 0 <;> [simp [hc]; simp [mul_left_inj', hc]]
state_before: α : Type ?u.7173
M₀ : Type u_1
G₀ : Type ?u.7179
M₀' : Type ?u.7182
G₀' : Type ?u.7185
F : Type ?u.7188
F' : Type ?u.7191
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
⊢ a * c = b * c ↔ a = b ∨ c = 0
Theorem: Part.div_mem_div
File: Mathlib/Data/Part.lean

tactic: simp [div_def]
state_before: α : Type u_1
β : Type ?u.59915
γ : Type ?u.59918
inst✝ : Div α
a b : Part α
ma mb : α
ha : ma ∈ a
hb : mb ∈ b
⊢ ma / mb ∈ a / b

tactic: aesop
state_before: α : Type u_1
β : Type ?u.59915
γ : Type ?u.59918
inst✝ : Div α
a b : Part α
ma mb : α
ha : ma ∈ a
hb : mb ∈ b
⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 / a = ma / mb
Theorem: Matrix.mul_add
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.266590
m : Type u_2
n : Type u_1
o : Type u_3
m' : o → Type ?u.266604
n' : o → Type ?u.266609
R : Type ?u.266612
S : Type ?u.266615
α : Type v
β : Type w
γ : Type ?u.266622
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype n
L : Matrix m n α
M N : Matrix n o α
⊢ L ⬝ (M + N) = L ⬝ M + L ⬝ N

tactic: apply dotProduct_add
state_before: case a.h
l : Type ?u.266590
m : Type u_2
n : Type u_1
o : Type u_3
m' : o → Type ?u.266604
n' : o → Type ?u.266609
R : Type ?u.266612
S : Type ?u.266615
α : Type v
β : Type w
γ : Type ?u.266622
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype n
L : Matrix m n α
M N : Matrix n o α
i✝ : m
x✝ : o
⊢ (L ⬝ (M + N)) i✝ x✝ = (L ⬝ M + L ⬝ N) i✝ x✝
Theorem: CategoryTheory.Subobject.underlyingIso_top_hom
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: convert underlyingIso_hom_comp_eq_mk (𝟙 B)
state_before: C : Type u₁
inst✝¹ : Category C
X Y Z : C
D : Type u₂
inst✝ : Category D
B : C
⊢ (underlyingIso (𝟙 B)).hom = arrow ⊤

tactic: simp only [comp_id]
state_before: case h.e'_2
C : Type u₁
inst✝¹ : Category C
X Y Z : C
D : Type u₂
inst✝ : Category D
B : C
⊢ (underlyingIso (𝟙 B)).hom = (underlyingIso (𝟙 B)).hom ≫ 𝟙 B
Theorem: Option.guard_eq_some
File: Std/Data/Option/Lemmas.lean

tactic: by_cases h : p a <;> simp [Option.guard, h]
state_before: α✝ : Type u_1
p : α✝ → Prop
a b : α✝
inst✝ : DecidablePred p
⊢ guard p a = some b ↔ a = b ∧ p a
Theorem: MulChar.IsQuadratic.comp
File: Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean

tactic: intro a
state_before: R : Type u
inst✝² : CommRing R
R' : Type v
inst✝¹ : CommRing R'
R'' : Type w
inst✝ : CommRing R''
χ : MulChar R R'
hχ : IsQuadratic χ
f : R' →+* R''
⊢ IsQuadratic (ringHomComp χ f)

tactic: rcases hχ a with (ha | ha | ha) <;> simp [ha]
state_before: R : Type u
inst✝² : CommRing R
R' : Type v
inst✝¹ : CommRing R'
R'' : Type w
inst✝ : CommRing R''
χ : MulChar R R'
hχ : IsQuadratic χ
f : R' →+* R''
a : R
⊢ ↑(ringHomComp χ f) a = 0 ∨ ↑(ringHomComp χ f) a = 1 ∨ ↑(ringHomComp χ f) a = -1
Theorem: Asymptotics.isLittleO_zero
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simpa using mul_nonneg hc.le (norm_nonneg <| g' x)
state_before: α : Type u_1
β : Type ?u.243376
E : Type ?u.243379
F : Type ?u.243382
G : Type ?u.243385
E' : Type u_2
F' : Type u_3
G' : Type ?u.243394
E'' : Type ?u.243397
F'' : Type ?u.243400
G'' : Type ?u.243403
R : Type ?u.243406
R' : Type ?u.243409
𝕜 : Type ?u.243412
𝕜' : Type ?u.243415
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 α
c : ℝ
hc : 0 < c
x : α
⊢ x ∈ {x | (fun x => ‖0‖ ≤ c * ‖g' x‖) x}
Theorem: Matrix.zero_vecMul
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.844759
m : Type u_1
n : Type u_2
o : Type ?u.844768
m' : o → Type ?u.844773
n' : o → Type ?u.844778
R : Type ?u.844781
S : Type ?u.844784
α : Type v
β : Type w
γ : Type ?u.844791
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype m
A : Matrix m n α
⊢ vecMul 0 A = 0

tactic: simp [vecMul]
state_before: case h
l : Type ?u.844759
m : Type u_1
n : Type u_2
o : Type ?u.844768
m' : o → Type ?u.844773
n' : o → Type ?u.844778
R : Type ?u.844781
S : Type ?u.844784
α : Type v
β : Type w
γ : Type ?u.844791
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype m
A : Matrix m n α
x✝ : n
⊢ vecMul 0 A x✝ = OfNat.ofNat 0 x✝
Theorem: IsClosed.prod
File: Mathlib/Topology/Constructions.lean

tactic: simp only [h₁.closure_eq, h₂.closure_eq, closure_prod_eq]
state_before: α : Type u
β : Type v
γ : Type ?u.63391
δ : Type ?u.63394
ε : Type ?u.63397
ζ : Type ?u.63400
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s₁ : Set α
s₂ : Set β
h₁ : IsClosed s₁
h₂ : IsClosed s₂
⊢ closure (s₁ ×ˢ s₂) = s₁ ×ˢ s₂
Theorem: Mathlib.Tactic.Ring.inv_mul
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R✝ : Type ?u.353952
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a₁ : R
a₂ : ℕ
a₃ b₁ b₃ c : R
x✝² : a₁⁻¹ = b₁
x✝¹ : a₃⁻¹ = b₃
x✝ : b₃ * (b₁ ^ a₂ * Nat.rawCast 1) = c
⊢ (a₁ ^ a₂ * a₃)⁻¹ = c

tactic: simp
state_before: u : Lean.Level
R✝ : Type ?u.353952
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a₁ : R
a₂ : ℕ
a₃ : R
⊢ (a₁ ^ a₂ * a₃)⁻¹ = a₃⁻¹ * (a₁⁻¹ ^ a₂ * Nat.rawCast 1)
Theorem: Nat.testBit_two_pow
File: Mathlib/Data/Nat/Bitwise.lean

tactic: by_cases h : n = m
state_before: n m : ℕ
⊢ (testBit (2 ^ n) m = true) = (n = m)

tactic: cases h
state_before: case pos
n m : ℕ
h : n = m
⊢ (testBit (2 ^ n) m = true) = (n = m)

tactic: simp
state_before: case pos.refl
n : ℕ
⊢ (testBit (2 ^ n) n = true) = (n = n)

tactic: rw [testBit_two_pow_of_ne h]
state_before: case neg
n m : ℕ
h : ¬n = m
⊢ (testBit (2 ^ n) m = true) = (n = m)

tactic: simp [h]
state_before: case neg
n m : ℕ
h : ¬n = m
⊢ (false = true) = (n = m)
Theorem: SimpleGraph.Walk.support_ne_nil
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: cases p <;> simp
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ support p ≠ []
Theorem: Int.cast_one_le_of_pos
File: Mathlib/Data/Int/Cast/Lemmas.lean

tactic: exact_mod_cast Int.add_one_le_of_lt h
state_before: F : Type ?u.26499
ι : Type ?u.26502
α : Type u_1
β : Type ?u.26508
inst✝ : LinearOrderedRing α
a b n : ℤ
h : 0 < a
⊢ 1 ≤ ↑a
Theorem: Matrix.J_det_mul_J_det
File: Mathlib/LinearAlgebra/SymplecticGroup.lean

tactic: rw [← det_mul, J_squared, ← one_smul R (-1 : Matrix _ _ R), smul_neg, ← neg_smul, det_smul,
  Fintype.card_sum, det_one, mul_one]
state_before: l : Type u_2
R : Type u_1
inst✝² : DecidableEq l
inst✝¹ : CommRing R
inst✝ : Fintype l
⊢ det (J l R) * det (J l R) = 1

tactic: apply Even.neg_one_pow
state_before: l : Type u_2
R : Type u_1
inst✝² : DecidableEq l
inst✝¹ : CommRing R
inst✝ : Fintype l
⊢ (-1) ^ (Fintype.card l + Fintype.card l) = 1

tactic: exact even_add_self _
state_before: case h
l : Type u_2
R : Type u_1
inst✝² : DecidableEq l
inst✝¹ : CommRing R
inst✝ : Fintype l
⊢ Even (Fintype.card l + Fintype.card l)
Theorem: Equiv.Perm.IsThreeCycle.card_support
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: rw [← sum_cycleType, h.cycleType, Multiset.sum_singleton]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
h : IsThreeCycle σ
⊢ Finset.card (support σ) = 3
Theorem: Filter.EventuallyEq.congr_continuousWithinAt
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [ContinuousWithinAt, hx, tendsto_congr' h, ContinuousWithinAt]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.340373
δ : Type ?u.340376
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f g : α → β
s : Set α
x : α
h : f =ᶠ[𝓝[s] x] g
hx : f x = g x
⊢ ContinuousWithinAt f s x ↔ ContinuousWithinAt g s x
Theorem: CategoryTheory.Presheaf.IsSheaf.amalgamate_map
File: Mathlib/CategoryTheory/Sites/Sheaf.lean

tactic: rcases I with ⟨Y, f, hf⟩
state_before: C : Type u₁
inst✝² : Category C
A✝ : Type u₂
inst✝¹ : Category A✝
J : GrothendieckTopology C
A : Type u₂
inst✝ : Category A
E : A
X : C
P : Cᵒᵖ ⥤ A
hP : IsSheaf J P
S : GrothendieckTopology.Cover J X
x : (I : GrothendieckTopology.Cover.Arrow S) → E ⟶ P.obj I.Y.op
hx :
  ∀ (I : GrothendieckTopology.Cover.Relation S),
    x (GrothendieckTopology.Cover.Relation.fst I) ≫ P.map I.g₁.op =
      x (GrothendieckTopology.Cover.Relation.snd I) ≫ P.map I.g₂.op
I : GrothendieckTopology.Cover.Arrow S
⊢ amalgamate hP S x hx ≫ P.map I.f.op = x I

tactic: apply
  @Presieve.IsSheafFor.valid_glue _ _ _ _ _ _ (hP _ _ S.condition) (fun Y f hf => x ⟨Y, f, hf⟩)
    (fun Y₁ Y₂ Z g₁ g₂ f₁ f₂ h₁ h₂ w => hx ⟨Y₁, Y₂, Z, g₁, g₂, f₁, f₂, h₁, h₂, w⟩) f hf
state_before: case mk
C : Type u₁
inst✝² : Category C
A✝ : Type u₂
inst✝¹ : Category A✝
J : GrothendieckTopology C
A : Type u₂
inst✝ : Category A
E : A
X : C
P : Cᵒᵖ ⥤ A
hP : IsSheaf J P
S : GrothendieckTopology.Cover J X
x : (I : GrothendieckTopology.Cover.Arrow S) → E ⟶ P.obj I.Y.op
hx :
  ∀ (I : GrothendieckTopology.Cover.Relation S),
    x (GrothendieckTopology.Cover.Relation.fst I) ≫ P.map I.g₁.op =
      x (GrothendieckTopology.Cover.Relation.snd I) ≫ P.map I.g₂.op
Y : C
f : Y ⟶ X
hf : (GrothendieckTopology.Cover.sieve S).arrows f
⊢ amalgamate hP S x hx ≫ P.map { Y := Y, f := f, hf := hf }.f.op = x { Y := Y, f := f, hf := hf }
Theorem: Homotopy.prevD_chainComplex
File: Mathlib/Algebra/Homology/Homotopy.lean

tactic: dsimp [prevD]
state_before: ι : Type ?u.294299
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
P Q : ChainComplex V ℕ
f : (i j : ℕ) → X P i ⟶ X Q j
j : ℕ
⊢ ↑(prevD j) f = f j (j + 1) ≫ d Q (j + 1) j

tactic: have : (ComplexShape.down ℕ).prev j = j + 1 := ChainComplex.prev ℕ j
state_before: ι : Type ?u.294299
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
P Q : ChainComplex V ℕ
f : (i j : ℕ) → X P i ⟶ X Q j
j : ℕ
⊢ f j (ComplexShape.prev (ComplexShape.down ℕ) j) ≫ d Q (ComplexShape.prev (ComplexShape.down ℕ) j) j =
    f j (j + 1) ≫ d Q (j + 1) j

tactic: congr 2
state_before: ι : Type ?u.294299
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
P Q : ChainComplex V ℕ
f : (i j : ℕ) → X P i ⟶ X Q j
j : ℕ
this : ComplexShape.prev (ComplexShape.down ℕ) j = j + 1
⊢ f j (ComplexShape.prev (ComplexShape.down ℕ) j) ≫ d Q (ComplexShape.prev (ComplexShape.down ℕ) j) j =
    f j (j + 1) ≫ d Q (j + 1) j
Theorem: int_prod_range_pos
File: Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean

tactic: refine' (int_prod_range_nonneg m n hn).lt_of_ne fun h => hm _
state_before: m : ℤ
n : ℕ
hn : Even n
hm : ¬m ∈ Ico 0 ↑n
⊢ 0 < ∏ k in Finset.range n, (m - ↑k)

tactic: rw [eq_comm, Finset.prod_eq_zero_iff] at h
state_before: m : ℤ
n : ℕ
hn : Even n
hm : ¬m ∈ Ico 0 ↑n
h : 0 = ∏ k in Finset.range n, (m - ↑k)
⊢ m ∈ Ico 0 ↑n

tactic: obtain ⟨a, ha, h⟩ := h
state_before: m : ℤ
n : ℕ
hn : Even n
hm : ¬m ∈ Ico 0 ↑n
h : ∃ a, a ∈ Finset.range n ∧ m - ↑a = 0
⊢ m ∈ Ico 0 ↑n

tactic: rw [sub_eq_zero.1 h]
state_before: case intro.intro
m : ℤ
n : ℕ
hn : Even n
hm : ¬m ∈ Ico 0 ↑n
a : ℕ
ha : a ∈ Finset.range n
h : m - ↑a = 0
⊢ m ∈ Ico 0 ↑n

tactic: exact ⟨Int.ofNat_zero_le _, Int.ofNat_lt.2 <| Finset.mem_range.1 ha⟩
state_before: case intro.intro
m : ℤ
n : ℕ
hn : Even n
hm : ¬m ∈ Ico 0 ↑n
a : ℕ
ha : a ∈ Finset.range n
h : m - ↑a = 0
⊢ ↑a ∈ Ico 0 ↑n
Theorem: mul_div_cancel''
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [div_eq_mul_inv, mul_inv_cancel_right a b]
state_before: α : Type ?u.57451
β : Type ?u.57454
G : Type u_1
inst✝ : Group G
a✝ b✝ c d a b : G
⊢ a * b / b = a
Theorem: Odd.pow
File: Mathlib/Algebra/Parity.lean

tactic: rw [pow_zero]
state_before: F : Type ?u.91525
α : Type u_1
β : Type ?u.91531
R : Type ?u.91534
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Odd m
⊢ Odd (m ^ 0)

tactic: exact odd_one
state_before: F : Type ?u.91525
α : Type u_1
β : Type ?u.91531
R : Type ?u.91534
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Odd m
⊢ Odd 1

tactic: rw [pow_succ]
state_before: F : Type ?u.91525
α : Type u_1
β : Type ?u.91531
R : Type ?u.91534
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Odd m
a : ℕ
⊢ Odd (m ^ (a + 1))

tactic: exact hm.mul <| Odd.pow hm
state_before: F : Type ?u.91525
α : Type u_1
β : Type ?u.91531
R : Type ?u.91534
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Odd m
a : ℕ
⊢ Odd (m * m ^ a)
Theorem: MatrixEquivTensor.invFun_add
File: Mathlib/RingTheory/MatrixAlgebra.lean

tactic: simp [invFun, add_tmul, Finset.sum_add_distrib]
state_before: R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M N : Matrix n n A
⊢ invFun R A n (M + N) = invFun R A n M + invFun R A n N
Theorem: Set.preimage_const
File: Mathlib/Data/Set/Image.lean

tactic: split_ifs with hb
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.10654
ι : Sort ?u.10657
ι' : Sort ?u.10660
f : α → β
g : β → γ
b : β
s : Set β
inst✝ : Decidable (b ∈ s)
⊢ (fun x => b) ⁻¹' s = if b ∈ s then univ else ∅

tactic: exacts [preimage_const_of_mem hb, preimage_const_of_not_mem hb]
state_before: case inl
α : Type u_2
β : Type u_1
γ : Type ?u.10654
ι : Sort ?u.10657
ι' : Sort ?u.10660
f : α → β
g : β → γ
b : β
s : Set β
inst✝ : Decidable (b ∈ s)
hb : b ∈ s
⊢ (fun x => b) ⁻¹' s = univ

case inr
α : Type u_2
β : Type u_1
γ : Type ?u.10654
ι : Sort ?u.10657
ι' : Sort ?u.10660
f : α → β
g : β → γ
b : β
s : Set β
inst✝ : Decidable (b ∈ s)
hb : ¬b ∈ s
⊢ (fun x => b) ⁻¹' s = ∅
Theorem: Submodule.mem_iSup_of_directed
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [← SetLike.mem_coe, coe_iSup_of_directed S H, mem_iUnion]
state_before: R : Type u_2
R₂ : Type ?u.90559
K : Type ?u.90562
M : Type u_3
M₂ : Type ?u.90568
V : Type ?u.90571
S✝ : Type ?u.90574
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x✝ : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s t : Set M
ι : Sort u_1
inst✝ : Nonempty ι
S : ι → Submodule R M
H : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ x ∈ iSup S ↔ ∃ i, x ∈ S i

tactic: rfl
state_before: R : Type u_2
R₂ : Type ?u.90559
K : Type ?u.90562
M : Type u_3
M₂ : Type ?u.90568
V : Type ?u.90571
S✝ : Type ?u.90574
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x✝ : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s t : Set M
ι : Sort u_1
inst✝ : Nonempty ι
S : ι → Submodule R M
H : Directed (fun x x_1 => x ≤ x_1) S
x : M
⊢ (∃ i, x ∈ ↑(S i)) ↔ ∃ i, x ∈ S i
Theorem: bihimp_eq_inf_himp_inf
File: Mathlib/Order/SymmDiff.lean

tactic: simp [himp_inf_distrib, bihimp]
state_before: ι : Type ?u.40596
α : Type u_1
β : Type ?u.40602
π : ι → Type ?u.40607
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ⇔ b = a ⊔ b ⇨ a ⊓ b
Theorem: multiplicity.pos_of_dvd
File: Mathlib/RingTheory/Multiplicity.lean

tactic: refine' zero_lt_iff.2 fun h => _
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hfin : Finite a b
hdiv : a ∣ b
⊢ 0 < Part.get (multiplicity a b) hfin

tactic: simpa [hdiv] using is_greatest' hfin (lt_one_iff.mpr h)
state_before: α : Type u_1
inst✝¹ : Monoid α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hfin : Finite a b
hdiv : a ∣ b
h : Part.get (multiplicity a b) hfin = 0
⊢ False
Theorem: Real.sqrt_eq_one
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [eq_comm, mul_one]
state_before: x y : ℝ
⊢ 1 * 1 = x ↔ x = 1
Theorem: WellFounded.eq_strictMono_iff_eq_range
File: Mathlib/Order/WellFounded.lean

tactic: funext a
state_before: α : Type ?u.4618
β : Type u_1
inst✝¹ : LinearOrder β
h : WellFounded fun x x_1 => x < x_1
γ : Type u_2
inst✝ : PartialOrder γ
f g : β → γ
hf : StrictMono f
hg : StrictMono g
hfg : range f = range g
⊢ f = g

tactic: apply h.induction a
state_before: case h
α : Type ?u.4618
β : Type u_1
inst✝¹ : LinearOrder β
h : WellFounded fun x x_1 => x < x_1
γ : Type u_2
inst✝ : PartialOrder γ
f g : β → γ
hf : StrictMono f
hg : StrictMono g
hfg : range f = range g
a : β
⊢ f a = g a

tactic: exact fun b H =>
  le_antisymm (eq_strictMono_iff_eq_range_aux hf hg hfg H)
    (eq_strictMono_iff_eq_range_aux hg hf hfg.symm fun a hab => (H a hab).symm)
state_before: case h
α : Type ?u.4618
β : Type u_1
inst✝¹ : LinearOrder β
h : WellFounded fun x x_1 => x < x_1
γ : Type u_2
inst✝ : PartialOrder γ
f g : β → γ
hf : StrictMono f
hg : StrictMono g
hfg : range f = range g
a : β
⊢ ∀ (x : β), (∀ (y : β), y < x → f y = g y) → f x = g x