tasksource/leandojo huggingface dataset:
Theorem: Computation.results_think_iff
File: Mathlib/Data/Seq/Computation.lean

tactic: let ⟨n', r, e⟩ := of_results_think h
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
a : α
n : ℕ
h : Results (think s) a (n + 1)
⊢ Results s a n

tactic: injection e with h'
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
a : α
n : ℕ
h : Results (think s) a (n + 1)
n' : ℕ
r : Results s a n'
e : n + 1 = n' + 1
⊢ Results s a n

tactic: rw [Nat.add, Nat.add] at h'
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
a : α
n : ℕ
h : Results (think s) a (n + 1)
n' : ℕ
r : Results s a n'
h' : Nat.add n 0 = Nat.add n' 0
⊢ Results s a n

tactic: rwa [h']
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
a : α
n : ℕ
h : Results (think s) a (n + 1)
n' : ℕ
r : Results s a n'
h' : n = n'
⊢ Results s a n
Theorem: Finset.card_image_of_injOn
File: Mathlib/Data/Finset/Card.lean

tactic: simp only [card, image_val_of_injOn H, card_map]
state_before: α : Type u_2
β : Type u_1
s t : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
H : Set.InjOn f ↑s
⊢ card (image f s) = card s
Theorem: Submodule.mem_dualAnnihilator
File: Mathlib/LinearAlgebra/Dual.lean

tactic: refine' LinearMap.mem_ker.trans _
state_before: R : Type u
M : Type v
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
W : Submodule R M
φ : Module.Dual R M
⊢ φ ∈ dualAnnihilator W ↔ ∀ (w : M), w ∈ W → ↑φ w = 0

tactic: simp_rw [LinearMap.ext_iff, dualRestrict_apply]
state_before: R : Type u
M : Type v
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
W : Submodule R M
φ : Module.Dual R M
⊢ ↑(dualRestrict W) φ = 0 ↔ ∀ (w : M), w ∈ W → ↑φ w = 0

tactic: exact ⟨fun h w hw => h ⟨w, hw⟩, fun h w => h w.1 w.2⟩
state_before: R : Type u
M : Type v
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
W : Submodule R M
φ : Module.Dual R M
⊢ (∀ (x : { x // x ∈ W }), ↑φ ↑x = ↑0 x) ↔ ∀ (w : M), w ∈ W → ↑φ w = 0
Theorem: TopologicalSpace.IsTopologicalBasis.mem_closure_iff
File: Mathlib/Topology/Bases.lean

tactic: simp only [and_imp]
state_before: α : Type u
t : TopologicalSpace α
b : Set (Set α)
hb : IsTopologicalBasis b
s : Set α
a : α
⊢ (∀ (i : Set α), i ∈ b ∧ a ∈ i → Set.Nonempty (i ∩ s)) ↔ ∀ (o : Set α), o ∈ b → a ∈ o → Set.Nonempty (o ∩ s)
Theorem: nhds_basis_uniformity'
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhds_eq_comap_uniformity]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
h : HasBasis (𝓤 α) p s
x : α
⊢ HasBasis (𝓝 x) p fun i => ball x (s i)

tactic: exact h.comap (Prod.mk x)
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
h : HasBasis (𝓤 α) p s
x : α
⊢ HasBasis (comap (Prod.mk x) (𝓤 α)) p fun i => ball x (s i)
Theorem: MvPolynomial.degreeOf_mul_le
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical
repeat' rw [degreeOf]
convert Multiset.count_le_of_le i (degrees_mul f g)
rw [Multiset.count_add]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.310892
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i : σ
f g : MvPolynomial σ R
⊢ degreeOf i (f * g) ≤ degreeOf i f + degreeOf i g

tactic: repeat' rw [degreeOf]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.310892
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i : σ
f g : MvPolynomial σ R
⊢ degreeOf i (f * g) ≤ degreeOf i f + degreeOf i g

tactic: convert Multiset.count_le_of_le i (degrees_mul f g)
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.310892
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i : σ
f g : MvPolynomial σ R
⊢ Multiset.count i (degrees (f * g)) ≤ Multiset.count i (degrees f) + Multiset.count i (degrees g)

tactic: rw [Multiset.count_add]
state_before: case h.e'_4
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.310892
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i : σ
f g : MvPolynomial σ R
⊢ Multiset.count i (degrees f) + Multiset.count i (degrees g) = Multiset.count i (degrees f + degrees g)

tactic: rw [degreeOf]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.310892
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
i : σ
f g : MvPolynomial σ R
⊢ Multiset.count i (degrees (f * g)) ≤ Multiset.count i (degrees f) + Multiset.count i (degrees g)
Theorem: SimpleGraph.incMatrix_apply'
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

tactic: unfold incMatrix Set.indicator
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝³ : Zero R
inst✝² : One R
inst✝¹ : DecidableEq α
inst✝ : DecidableRel G.Adj
a : α
e : Sym2 α
⊢ incMatrix R G a e = if e ∈ incidenceSet G a then 1 else 0

tactic: simp only [Pi.one_apply]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝³ : Zero R
inst✝² : One R
inst✝¹ : DecidableEq α
inst✝ : DecidableRel G.Adj
a : α
e : Sym2 α
⊢ (let x := e;
    if x ∈ incidenceSet G a then OfNat.ofNat 1 x else 0) =
    if e ∈ incidenceSet G a then 1 else 0
Theorem: Polynomial.separable_X_pow_sub_C_unit
File: Mathlib/FieldTheory/Separable.lean

tactic: nontriviality R
state_before: R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
⊢ Separable (X ^ n - ↑C ↑u)

tactic: rcases n.eq_zero_or_pos with (rfl | hpos)
state_before: R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
⊢ Separable (X ^ n - ↑C ↑u)

tactic: apply (separable_def' (X ^ n - C (u : R))).2
state_before: case inr
R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
⊢ Separable (X ^ n - ↑C ↑u)

tactic: obtain ⟨n', hn'⟩ := hn.exists_left_inv
state_before: case inr
R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
⊢ ∃ a b, a * (X ^ n - ↑C ↑u) + b * ↑derivative (X ^ n - ↑C ↑u) = 1

tactic: refine' ⟨-C ↑u⁻¹, C (↑u⁻¹ : R) * C n' * X, _⟩
state_before: case inr.intro
R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ ∃ a b, a * (X ^ n - ↑C ↑u) + b * ↑derivative (X ^ n - ↑C ↑u) = 1

tactic: rw [derivative_sub, derivative_C, sub_zero, derivative_pow X n, derivative_X, mul_one]
state_before: case inr.intro
R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * ↑derivative (X ^ n - ↑C ↑u) = 1

tactic: calc
  -C ↑u⁻¹ * (X ^ n - C ↑u) + C ↑u⁻¹ * C n' * X * (↑n * X ^ (n - 1)) =
      C (↑u⁻¹ * ↑u) - C ↑u⁻¹ * X ^ n + C ↑u⁻¹ * C (n' * ↑n) * (X * X ^ (n - 1)) := by
    simp only [C.map_mul, C_eq_nat_cast]
    ring
  _ = 1 := by
    simp only [Units.inv_mul, hn', C.map_one, mul_one, ← pow_succ,
      Nat.sub_add_cancel (show 1 ≤ n from hpos), sub_add_cancel]
state_before: case inr.intro
R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑C ↑n * X ^ (n - 1)) = 1

tactic: simp at hn
state_before: case inl
R : Type u
inst✝ : CommRing R
u : Rˣ
✝ : Nontrivial R
hn : IsUnit ↑0
⊢ Separable (X ^ 0 - ↑C ↑u)

tactic: simp only [C.map_mul, C_eq_nat_cast]
state_before: R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑n * X ^ (n - 1)) =
    ↑C (↑u⁻¹ * ↑u) - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * ↑C (n' * ↑n) * (X * X ^ (n - 1))

tactic: ring
state_before: R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑n * X ^ (n - 1)) =
    ↑C ↑u⁻¹ * ↑C ↑u - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * (↑C n' * ↑n) * (X * X ^ (n - 1))

tactic: simp only [Units.inv_mul, hn', C.map_one, mul_one, ← pow_succ,
  Nat.sub_add_cancel (show 1 ≤ n from hpos), sub_add_cancel]
state_before: R : Type u
inst✝ : CommRing R
n : ℕ
u : Rˣ
hn : IsUnit ↑n
✝ : Nontrivial R
hpos : n > 0
n' : R
hn' : n' * ↑n = 1
⊢ ↑C (↑u⁻¹ * ↑u) - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * ↑C (n' * ↑n) * (X * X ^ (n - 1)) = 1
Theorem: ContinuousLinearMap.apply_norm_eq_sqrt_inner_adjoint_left
File: Mathlib/Analysis/InnerProductSpace/Adjoint.lean

tactic: rw [← apply_norm_sq_eq_inner_adjoint_left, Real.sqrt_sq (norm_nonneg _)]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.600458
G : Type ?u.600461
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace G
inst✝ : CompleteSpace F
A : E →L[𝕜] E
x : E
⊢ ‖↑A x‖ = Real.sqrt (↑re (inner (↑(↑adjoint A * A) x) x))
Theorem: Prod.gameAdd_swap_swap
File: Mathlib/Order/GameAdd.lean

tactic: rw [Prod.swap, Prod.swap, gameAdd_mk_iff, gameAdd_mk_iff, or_comm]
state_before: α : Type u_1
β : Type u_2
rα : α → α → Prop
rβ : β → β → Prop
x✝¹ x✝ : α × β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
⊢ GameAdd rβ rα (swap (a₁, b₁)) (swap (a₂, b₂)) ↔ GameAdd rα rβ (a₁, b₁) (a₂, b₂)
Theorem: CategoryTheory.Limits.biproduct.mapBiproduct_hom_desc
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Biproducts.lean

tactic: rw [← biproduct.mapBiproduct_inv_map_desc, Iso.hom_inv_id_assoc]
state_before: C : Type u₁
inst✝⁶ : Category C
D : Type u₂
inst✝⁵ : Category D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
F : C ⥤ D
inst✝² : PreservesZeroMorphisms F
J : Type w₁
f : J → C
inst✝¹ : HasBiproduct f
inst✝ : PreservesBiproduct f F
W : C
g : (j : J) → f j ⟶ W
⊢ ((mapBiproduct F f).hom ≫ desc fun j => F.map (g j)) = F.map (desc g)
Theorem: Nat.lt_one_of_floor_lt_one
File: Mathlib/Algebra/Order/Floor.lean

tactic: exact_mod_cast lt_of_floor_lt h
state_before: F : Type ?u.21713
α : Type u_1
β : Type ?u.21719
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
h : ⌊a⌋₊ < 1
⊢ a < 1
Theorem: LieSubmodule.isNilpotent_iff_exists_self_le_ucs
File: Mathlib/Algebra/Lie/Nilpotent.lean

tactic: simp_rw [LieModule.isNilpotent_iff_exists_ucs_eq_top, ← ucs_comap_incl, comap_incl_eq_top]
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
k : ℕ
N N₁ N₂ : LieSubmodule R L M
⊢ LieModule.IsNilpotent R L { x // x ∈ ↑N } ↔ ∃ k, N ≤ ucs k ⊥
Theorem: Set.Finite.lowerClosure
File: Mathlib/Order/UpperLower/LocallyFinite.lean

tactic: rw [coe_lowerClosure]
state_before: α : Type u_1
inst✝¹ : Preorder α
s : Set α
inst✝ : LocallyFiniteOrderBot α
hs : Set.Finite s
⊢ Set.Finite ↑(lowerClosure s)

tactic: exact hs.biUnion fun _ _ => finite_Iic _
state_before: α : Type u_1
inst✝¹ : Preorder α
s : Set α
inst✝ : LocallyFiniteOrderBot α
hs : Set.Finite s
⊢ Set.Finite (⋃ (a : α) (_ : a ∈ s), Iic a)
Theorem: AlgebraicTopology.DoldKan.HigherFacesVanish.comp_δ_eq_zero
File: Mathlib/AlgebraicTopology/DoldKan/Faces.lean

tactic: obtain ⟨i, rfl⟩ := Fin.eq_succ_of_ne_zero hj₁
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
v : HigherFacesVanish q φ
j : Fin (n + 2)
hj₁ : j ≠ 0
hj₂ : n + 2 ≤ ↑j + q
⊢ φ ≫ δ X j = 0

tactic: apply v i
state_before: case intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
i : Fin (n + 1)
hj₁ : Fin.succ i ≠ 0
hj₂ : n + 2 ≤ ↑(Fin.succ i) + q
⊢ φ ≫ δ X (Fin.succ i) = 0

tactic: simp only [Fin.val_succ] at hj₂
state_before: case intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
i : Fin (n + 1)
hj₁ : Fin.succ i ≠ 0
hj₂ : n + 2 ≤ ↑(Fin.succ i) + q
⊢ n + 1 ≤ ↑i + q

tactic: linarith
state_before: case intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
i : Fin (n + 1)
hj₁ : Fin.succ i ≠ 0
hj₂ : n + 2 ≤ ↑i + 1 + q
⊢ n + 1 ≤ ↑i + q
Theorem: GromovHausdorff.one_le_maxVar
File: Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean

tactic: simp
state_before: X : Type u
Y : Type v
inst✝⁵ : MetricSpace X
inst✝⁴ : CompactSpace X
inst✝³ : Nonempty X
inst✝² : MetricSpace Y
inst✝¹ : CompactSpace Y
inst✝ : Nonempty Y
⊢ 1 = 2 * 0 + 1 + 2 * 0

tactic: gcongr <;> positivity
state_before: X : Type u
Y : Type v
inst✝⁵ : MetricSpace X
inst✝⁴ : CompactSpace X
inst✝³ : Nonempty X
inst✝² : MetricSpace Y
inst✝¹ : CompactSpace Y
inst✝ : Nonempty Y
⊢ 2 * 0 + 1 + 2 * 0 ≤ 2 * diam univ + 1 + 2 * diam univ
Theorem: Zsqrtd.norm_nonneg
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: rw [mul_assoc, neg_mul_eq_neg_mul]
state_before: d : ℤ
hd : d ≤ 0
n : ℤ√d
⊢ 0 ≤ -(d * n.im * n.im)

tactic: exact mul_nonneg (neg_nonneg.2 hd) (mul_self_nonneg _)
state_before: d : ℤ
hd : d ≤ 0
n : ℤ√d
⊢ 0 ≤ -d * (n.im * n.im)
Theorem: NormedAddGroupHom.le_opNorm_of_le
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: gcongr
state_before: V : Type ?u.226355
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.226364
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
c : ℝ
x : V₁
h : ‖x‖ ≤ c
⊢ ‖f‖ * ‖x‖ ≤ ‖f‖ * c

tactic: exact f.opNorm_nonneg
state_before: case a0
V : Type ?u.226355
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.226364
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
c : ℝ
x : V₁
h : ‖x‖ ≤ c
⊢ 0 ≤ ‖f‖
Theorem: Finsupp.neLocus_sub_left
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: simp only [sub_eq_add_neg, neLocus_add_left, neLocus_neg_neg]
state_before: α : Type u_1
M : Type ?u.28251
N : Type u_2
P : Type ?u.28257
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : AddGroup N
f f₁ f₂ g g₁ g₂ : α →₀ N
⊢ neLocus (f - g₁) (f - g₂) = neLocus g₁ g₂
Theorem: Polynomial.sub_dvd_eval_sub
File: Mathlib/Data/Polynomial/Div.lean

tactic: suffices X - C b ∣ p - C (p.eval b) by
  simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C] using (evalRingHom a).map_dvd this
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
⊢ a - b ∣ eval a p - eval b p

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

tactic: simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C] using (evalRingHom a).map_dvd this
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
this : X - ↑C b ∣ p - ↑C (eval b p)
⊢ a - b ∣ eval a p - eval b p
Theorem: CategoryTheory.epi_comp
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: constructor
state_before: C : Type u
inst✝² : Category C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
inst✝¹ : Epi f
g : Y ⟶ Z
inst✝ : Epi g
⊢ Epi (f ≫ g)

tactic: intro Z a b w
state_before: case left_cancellation
C : Type u
inst✝² : Category C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
inst✝¹ : Epi f
g : Y ⟶ Z
inst✝ : Epi g
⊢ ∀ {Z_1 : C} (g_1 h : Z ⟶ Z_1), (f ≫ g) ≫ g_1 = (f ≫ g) ≫ h → g_1 = h

tactic: apply (cancel_epi g).1
state_before: case left_cancellation
C : Type u
inst✝² : Category C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
inst✝¹ : Epi f
g : Y ⟶ Z✝
inst✝ : Epi g
Z : C
a b : Z✝ ⟶ Z
w : (f ≫ g) ≫ a = (f ≫ g) ≫ b
⊢ a = b

tactic: apply (cancel_epi f).1
state_before: case left_cancellation
C : Type u
inst✝² : Category C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
inst✝¹ : Epi f
g : Y ⟶ Z✝
inst✝ : Epi g
Z : C
a b : Z✝ ⟶ Z
w : (f ≫ g) ≫ a = (f ≫ g) ≫ b
⊢ g ≫ a = g ≫ b

tactic: simpa using w
state_before: case left_cancellation
C : Type u
inst✝² : Category C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
inst✝¹ : Epi f
g : Y ⟶ Z✝
inst✝ : Epi g
Z : C
a b : Z✝ ⟶ Z
w : (f ≫ g) ≫ a = (f ≫ g) ≫ b
⊢ f ≫ g ≫ a = f ≫ g ≫ b
Theorem: MulOpposite.op_list_prod
File: Mathlib/Data/List/BigOperators/Lemmas.lean

tactic: intro l
state_before: ι : Type ?u.27087
α : Type ?u.27090
M : Type u_1
N : Type ?u.27096
P : Type ?u.27099
M₀ : Type ?u.27102
G : Type ?u.27105
R : Type ?u.27108
inst✝ : Monoid M
⊢ ∀ (l : List M), op (prod l) = prod (reverse (map op l))

tactic: induction l with
| nil => rfl
| cons x xs ih =>
rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]
state_before: ι : Type ?u.27087
α : Type ?u.27090
M : Type u_1
N : Type ?u.27096
P : Type ?u.27099
M₀ : Type ?u.27102
G : Type ?u.27105
R : Type ?u.27108
inst✝ : Monoid M
l : List M
⊢ op (prod l) = prod (reverse (map op l))

tactic: rfl
state_before: case nil
ι : Type ?u.27087
α : Type ?u.27090
M : Type u_1
N : Type ?u.27096
P : Type ?u.27099
M₀ : Type ?u.27102
G : Type ?u.27105
R : Type ?u.27108
inst✝ : Monoid M
⊢ op (prod []) = prod (reverse (map op []))

tactic: rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]
state_before: case cons
ι : Type ?u.27087
α : Type ?u.27090
M : Type u_1
N : Type ?u.27096
P : Type ?u.27099
M₀ : Type ?u.27102
G : Type ?u.27105
R : Type ?u.27108
inst✝ : Monoid M
x : M
xs : List M
ih : op (prod xs) = prod (reverse (map op xs))
⊢ op (prod (x :: xs)) = prod (reverse (map op (x :: xs)))
Theorem: isOpen_lt
File: Mathlib/Topology/Order/Basic.lean

tactic: simpa only [lt_iff_not_le] using (isClosed_le hg hf).isOpen_compl
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderClosedTopology α
inst✝ : TopologicalSpace β
f g : β → α
hf : Continuous f
hg : Continuous g
⊢ IsOpen {b | f b < g b}
Theorem: SimpleGraph.not_isUniform_zero
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: simp
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : IsUniform G 0 s t
⊢ ↑(card s) * 0 ≤ ↑(card ∅)

tactic: simp
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : IsUniform G 0 s t
⊢ ↑(card t) * 0 ≤ ↑(card ∅)
Theorem: finrank_eq_one_iff_of_nonzero
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: simpa using (basisSingleton PUnit.{u+1} h v nz).span_eq
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
v : V
nz : v ≠ 0
h : finrank K V = 1
⊢ span K {v} = ⊤

tactic: convert s.ge
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
v : V
nz : v ≠ 0
s : span K {v} = ⊤
⊢ ⊤ ≤ span K (Set.range fun x => ↑x)

tactic: simp
state_before: case h.e'_4.h.e'_6
K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
v : V
nz : v ≠ 0
s : span K {v} = ⊤
⊢ (Set.range fun x => ↑x) = {v}
Theorem: neg_pow_bit1
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: simp only [bit1, pow_succ, neg_pow_bit0, neg_mul_eq_neg_mul]
state_before: R : Type u_1
S : Type ?u.109740
M : Type ?u.109743
inst✝¹ : Monoid R
inst✝ : HasDistribNeg R
a : R
n : ℕ
⊢ (-a) ^ bit1 n = -a ^ bit1 n
Theorem: IsFractional.map
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: obtain ⟨b', b'_mem, hb'⟩ := Submodule.mem_map.mp hb
state_before: R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_3
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.518529
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
g : P →ₐ[R] P'
I : Submodule R P
a : R
a_nonzero : a ∈ S
hI : ∀ (b : P), b ∈ I → IsInteger R (a • b)
b : P'
hb : b ∈ Submodule.map (AlgHom.toLinearMap g) I
⊢ IsInteger R (a • b)

tactic: obtain ⟨x, hx⟩ := hI b' b'_mem
state_before: case intro.intro
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_3
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.518529
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
g : P →ₐ[R] P'
I : Submodule R P
a : R
a_nonzero : a ∈ S
hI : ∀ (b : P), b ∈ I → IsInteger R (a • b)
b : P'
hb : b ∈ Submodule.map (AlgHom.toLinearMap g) I
b' : P
b'_mem : b' ∈ I
hb' : ↑(AlgHom.toLinearMap g) b' = b
⊢ IsInteger R (a • b)

tactic: use x
state_before: case intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_3
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.518529
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
g : P →ₐ[R] P'
I : Submodule R P
a : R
a_nonzero : a ∈ S
hI : ∀ (b : P), b ∈ I → IsInteger R (a • b)
b : P'
hb : b ∈ Submodule.map (AlgHom.toLinearMap g) I
b' : P
b'_mem : b' ∈ I
hb' : ↑(AlgHom.toLinearMap g) b' = b
x : R
hx : ↑(algebraMap R P) x = a • b'
⊢ IsInteger R (a • b)

tactic: erw [← g.commutes, hx, g.map_smul, hb']
state_before: case intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_3
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.518529
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
g : P →ₐ[R] P'
I : Submodule R P
a : R
a_nonzero : a ∈ S
hI : ∀ (b : P), b ∈ I → IsInteger R (a • b)
b : P'
hb : b ∈ Submodule.map (AlgHom.toLinearMap g) I
b' : P
b'_mem : b' ∈ I
hb' : ↑(AlgHom.toLinearMap g) b' = b
x : R
hx : ↑(algebraMap R P) x = a • b'
⊢ ↑(algebraMap R P') x = a • b
Theorem: CompleteLattice.independent_def''
File: Mathlib/Order/SupIndep.lean

tactic: rw [independent_def']
state_before: α : Type u_2
β : Type ?u.37048
ι : Type u_1
ι' : Type ?u.37054
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ Independent t ↔ ∀ (i : ι), Disjoint (t i) (sSup {a | ∃ j x, t j = a})

tactic: aesop
state_before: α : Type u_2
β : Type ?u.37048
ι : Type u_1
ι' : Type ?u.37054
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ (∀ (i : ι), Disjoint (t i) (sSup (t '' {j | j ≠ i}))) ↔ ∀ (i : ι), Disjoint (t i) (sSup {a | ∃ j x, t j = a})
Theorem: Rel.inv_inv
File: Mathlib/Data/Rel.lean

tactic: ext (x y)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.884
r : Rel α β
⊢ inv (inv r) = r

tactic: rfl
state_before: case a.h.a
α : Type u_1
β : Type u_2
γ : Type ?u.884
r : Rel α β
x : α
y : β
⊢ inv (inv r) x y ↔ r x y
Theorem: CategoryTheory.Limits.imageSubobject_factors_comp_self
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
X Y Z : C
f : X ⟶ Y
inst✝ : HasImage f
W : C
k : W ⟶ X
⊢ (k ≫ factorThruImage f) ≫ MonoOver.arrow (MonoOver.mk' (image.ι f)) = k ≫ f
Theorem: Matrix.StdBasisMatrix.mul_right_apply_of_ne
File: Mathlib/Data/Matrix/Basis.lean

tactic: simp [mul_apply, hbj.symm]
state_before: l : Type ?u.39829
m : Type ?u.39832
n : Type u_1
R : Type ?u.39838
α : Type u_2
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
a b : n
hbj : b ≠ j
M : Matrix n n α
⊢ (M ⬝ stdBasisMatrix i j c) a b = 0
Theorem: List.exists_duplicate_iff_not_nodup
File: Mathlib/Data/List/Duplicate.lean

tactic: simp [nodup_iff_forall_not_duplicate]
state_before: α : Type u_1
l : List α
x : α
⊢ (∃ x, x ∈+ l) ↔ ¬Nodup l