tasksource/leandojo huggingface dataset:
Theorem: List.revzip_swap
File: Mathlib/Data/List/Zip.lean

tactic: simp [revzip]
state_before: α : Type u
β : Type ?u.94286
γ : Type ?u.94289
δ : Type ?u.94292
ε : Type ?u.94295
l : List α
⊢ map Prod.swap (revzip l) = revzip (reverse l)
Theorem: MeasureTheory.JordanDecomposition.real_smul_negPart_nonneg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: rw [real_smul_def, ← smul_negPart, if_pos hr]
state_before: α : Type u_1
β : Type ?u.12757
inst✝ : MeasurableSpace α
j : JordanDecomposition α
r : ℝ
hr : 0 ≤ r
⊢ (r • j).negPart = Real.toNNReal r • j.negPart
Theorem: Nat.choose_symm_of_eq_add
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: suffices : choose n (n - b) = choose n b
state_before: n a b : ℕ
h : n = a + b
⊢ choose n a = choose n b

tactic: . rw [h, add_tsub_cancel_right] at this; rwa [h]
state_before: n a b : ℕ
h : n = a + b
this : choose n (n - b) = choose n b
⊢ choose n a = choose n b

case this
n a b : ℕ
h : n = a + b
⊢ choose n (n - b) = choose n b

tactic: exact choose_symm (h ▸ le_add_left _ _)
state_before: case this
n a b : ℕ
h : n = a + b
⊢ choose n (n - b) = choose n b

tactic: rw [h, add_tsub_cancel_right] at this
state_before: n a b : ℕ
h : n = a + b
this : choose n (n - b) = choose n b
⊢ choose n a = choose n b

tactic: rwa [h]
state_before: n a b : ℕ
h : n = a + b
this : choose (a + b) a = choose (a + b) b
⊢ choose n a = choose n b
Theorem: AEMeasurable.subtype_mk
File: Mathlib/MeasureTheory/Measure/AEMeasurable.lean

tactic: nontriviality α
state_before: ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
⊢ AEMeasurable (codRestrict f s hfs)

tactic: inhabit α
state_before: ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
✝ : Nontrivial α
⊢ AEMeasurable (codRestrict f s hfs)

tactic: obtain ⟨g, g_meas, hg, fg⟩ : ∃ g : α → β, Measurable g ∧ range g ⊆ s ∧ f =ᵐ[μ] g :=
  h.exists_ae_eq_range_subset (eventually_of_forall hfs) ⟨_, hfs default⟩
state_before: ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
✝ : Nontrivial α
inhabited_h : Inhabited α
⊢ AEMeasurable (codRestrict f s hfs)

tactic: refine' ⟨codRestrict g s fun x => hg (mem_range_self _), Measurable.subtype_mk g_meas, _⟩
state_before: case intro.intro.intro
ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
✝ : Nontrivial α
inhabited_h : Inhabited α
g : α → β
g_meas : Measurable g
hg : range g ⊆ s
fg : f =ᶠ[ae μ] g
⊢ AEMeasurable (codRestrict f s hfs)

tactic: filter_upwards [fg] with x hx
state_before: case intro.intro.intro
ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
✝ : Nontrivial α
inhabited_h : Inhabited α
g : α → β
g_meas : Measurable g
hg : range g ⊆ s
fg : f =ᶠ[ae μ] g
⊢ codRestrict f s hfs =ᶠ[ae μ] codRestrict g s (_ : ∀ (x : α), g x ∈ s)

tactic: simpa [Subtype.ext_iff]
state_before: case h
ι : Type ?u.2834714
α : Type u_1
β : Type u_2
γ : Type ?u.2834723
δ : Type ?u.2834726
R : Type ?u.2834729
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ ν : MeasureTheory.Measure α
h : AEMeasurable f
s : Set β
hfs : ∀ (x : α), f x ∈ s
✝ : Nontrivial α
inhabited_h : Inhabited α
g : α → β
g_meas : Measurable g
hg : range g ⊆ s
fg : f =ᶠ[ae μ] g
x : α
hx : f x = g x
⊢ codRestrict f s hfs x = codRestrict g s (_ : ∀ (x : α), g x ∈ s) x
Theorem: Matrix.toBlock_diagonal_self
File: Mathlib/Data/Matrix/Block.lean

tactic: ext (i j)
state_before: l : Type ?u.113198
m : Type u_1
n : Type ?u.113204
o : Type ?u.113207
p✝ : Type ?u.113210
q : Type ?u.113213
m' : o → Type ?u.113218
n' : o → Type ?u.113223
p' : o → Type ?u.113228
R : Type ?u.113231
S : Type ?u.113234
α : Type u_2
β : Type ?u.113240
inst✝² : DecidableEq l
inst✝¹ : DecidableEq m
inst✝ : Zero α
d : m → α
p : m → Prop
⊢ toBlock (diagonal d) p p = diagonal fun i => d ↑i

tactic: by_cases i = j
state_before: case a.h
l : Type ?u.113198
m : Type u_1
n : Type ?u.113204
o : Type ?u.113207
p✝ : Type ?u.113210
q : Type ?u.113213
m' : o → Type ?u.113218
n' : o → Type ?u.113223
p' : o → Type ?u.113228
R : Type ?u.113231
S : Type ?u.113234
α : Type u_2
β : Type ?u.113240
inst✝² : DecidableEq l
inst✝¹ : DecidableEq m
inst✝ : Zero α
d : m → α
p : m → Prop
i j : { a // p a }
⊢ toBlock (diagonal d) p p i j = diagonal (fun i => d ↑i) i j

tactic: simp [h]
state_before: case pos
l : Type ?u.113198
m : Type u_1
n : Type ?u.113204
o : Type ?u.113207
p✝ : Type ?u.113210
q : Type ?u.113213
m' : o → Type ?u.113218
n' : o → Type ?u.113223
p' : o → Type ?u.113228
R : Type ?u.113231
S : Type ?u.113234
α : Type u_2
β : Type ?u.113240
inst✝² : DecidableEq l
inst✝¹ : DecidableEq m
inst✝ : Zero α
d : m → α
p : m → Prop
i j : { a // p a }
h : i = j
⊢ toBlock (diagonal d) p p i j = diagonal (fun i => d ↑i) i j

tactic: simp [One.one, h, Subtype.val_injective.ne h]
state_before: case neg
l : Type ?u.113198
m : Type u_1
n : Type ?u.113204
o : Type ?u.113207
p✝ : Type ?u.113210
q : Type ?u.113213
m' : o → Type ?u.113218
n' : o → Type ?u.113223
p' : o → Type ?u.113228
R : Type ?u.113231
S : Type ?u.113234
α : Type u_2
β : Type ?u.113240
inst✝² : DecidableEq l
inst✝¹ : DecidableEq m
inst✝ : Zero α
d : m → α
p : m → Prop
i j : { a // p a }
h : ¬i = j
⊢ toBlock (diagonal d) p p i j = diagonal (fun i => d ↑i) i j
Theorem: CategoryTheory.MonoidalCategory.triangle_assoc_comp_right
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← triangle, Iso.inv_hom_id_assoc]
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
⊢ (α_ X (𝟙_ C) Y).inv ≫ ((ρ_ X).hom ⊗ 𝟙 Y) = 𝟙 X ⊗ (λ_ Y).hom
Theorem: Cardinal.IsRegular.ord_pos
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [Cardinal.lt_ord]
state_before: α : Type ?u.144886
r : α → α → Prop
c : Cardinal
H : IsRegular c
⊢ 0 < ord c

tactic: exact H.pos
state_before: α : Type ?u.144886
r : α → α → Prop
c : Cardinal
H : IsRegular c
⊢ card 0 < c
Theorem: CategoryTheory.Limits.PreservesPullback.iso_hom_fst
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean

tactic: simp [PreservesPullback.iso]
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
G : C ⥤ D
W X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
h : W ⟶ X
k : W ⟶ Y
comm : h ≫ f = k ≫ g
inst✝² : PreservesLimit (cospan f g) G
inst✝¹ : HasPullback f g
inst✝ : HasPullback (G.map f) (G.map g)
⊢ (iso G f g).hom ≫ pullback.fst = G.map pullback.fst
Theorem: ProbabilityTheory.condCount_eq_zero_iff
File: Mathlib/Probability/CondCount.lean

tactic: simp [condCount, cond_apply _ hs.measurableSet, Measure.count_apply_eq_top, Set.not_infinite.2 hs,
  Measure.count_apply_finite _ (hs.inter_of_left _)]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
⊢ ↑↑(condCount s) t = 0 ↔ s ∩ t = ∅
Theorem: inv_eq_of_root_of_coeff_zero_ne_zero
File: Mathlib/RingTheory/Algebraic.lean

tactic: convert inv_eq_of_aeval_divX_ne_zero (p := p) (L := L)
  (mt (fun h => (algebraMap K L).injective ?_) coeff_zero_ne) using 1
state_before: R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
⊢ x⁻¹ = -(↑(aeval x) (divX p) / ↑(algebraMap K L) (coeff p 0))

tactic: rw [RingHom.map_zero]
state_before: case convert_2
R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
h : ↑(aeval x) (divX p) = 0
⊢ ↑(algebraMap K L) (coeff p 0) = ↑(algebraMap K L) 0

tactic: convert aeval_eq
state_before: case convert_2
R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
h : ↑(aeval x) (divX p) = 0
⊢ ↑(algebraMap K L) (coeff p 0) = 0

tactic: conv_rhs => rw [← divX_mul_X_add p]
state_before: case h.e'_2
R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
h : ↑(aeval x) (divX p) = 0
⊢ ↑(algebraMap K L) (coeff p 0) = ↑(aeval x) p

tactic: rw [AlgHom.map_add, AlgHom.map_mul, h, MulZeroClass.zero_mul, zero_add, aeval_C]
state_before: case h.e'_2
R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
h : ↑(aeval x) (divX p) = 0
⊢ ↑(algebraMap K L) (coeff p 0) = ↑(aeval x) (divX p * X + ↑C (coeff p 0))

tactic: rw [aeval_eq, zero_sub, div_neg]
state_before: case h.e'_3
R : Type ?u.658329
S : Type ?u.658332
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : L
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
⊢ -(↑(aeval x) (divX p) / ↑(algebraMap K L) (coeff p 0)) =
    ↑(aeval x) (divX p) / (↑(aeval x) p - ↑(algebraMap K L) (coeff p 0))
Theorem: le_bihimp_iff
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [bihimp, le_inf_iff, le_himp_iff, and_comm]
state_before: ι : Type ?u.39493
α : Type u_1
β : Type ?u.39499
π : ι → Type ?u.39504
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d a b c : α
⊢ a ≤ b ⇔ c ↔ a ⊓ b ≤ c ∧ a ⊓ c ≤ b
Theorem: Nat.preimage_Ioo
File: Mathlib/Algebra/Order/Floor.lean

tactic: ext
state_before: F : Type ?u.60275
α : Type u_1
β : Type ?u.60281
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
ha : 0 ≤ a
⊢ Nat.cast ⁻¹' Ioo a b = Ioo ⌊a⌋₊ ⌈b⌉₊

tactic: simp [floor_lt, lt_ceil, ha]
state_before: case h
F : Type ?u.60275
α : Type u_1
β : Type ?u.60281
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
ha : 0 ≤ a
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Ioo a b ↔ x✝ ∈ Ioo ⌊a⌋₊ ⌈b⌉₊
Theorem: finprod_mem_eq_one_of_forall_eq_one
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: simp (config := { contextual := true }) [h]
state_before: α : Type u_1
β : Type ?u.204667
ι : Type ?u.204670
G : Type ?u.204673
M : Type u_2
N : Type ?u.204679
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
h : ∀ (x : α), x ∈ s → f x = 1
⊢ (∏ᶠ (i : α) (_ : i ∈ s), f i) = 1
Theorem: MeasureTheory.snorm'_le_nnreal_smul_snorm'_of_ae_le_mul
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp_rw [snorm']
state_before: α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ snorm' f p μ ≤ c • snorm' g p μ

tactic: rw [← ENNReal.rpow_le_rpow_iff hp, ENNReal.smul_def, smul_eq_mul,
  ENNReal.mul_rpow_of_nonneg _ _ hp.le]
state_before: α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ c • (∫⁻ (a : α), ↑‖g a‖₊ ^ p ∂μ) ^ (1 / p)

tactic: simp_rw [← ENNReal.rpow_mul, one_div, inv_mul_cancel hp.ne.symm, ENNReal.rpow_one,
  ENNReal.coe_rpow_of_nonneg _ hp.le, ← lintegral_const_mul' _ _ ENNReal.coe_ne_top, ←
  ENNReal.coe_mul]
state_before: α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ ((∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p)) ^ p ≤ ↑c ^ p * ((∫⁻ (a : α), ↑‖g a‖₊ ^ p ∂μ) ^ (1 / p)) ^ p

tactic: apply lintegral_mono_ae
state_before: α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ (∫⁻ (a : α), ↑(‖f a‖₊ ^ p) ∂μ) ≤ ∫⁻ (a : α), ↑(c ^ p * ‖g a‖₊ ^ p) ∂μ

tactic: simp_rw [ENNReal.coe_le_coe, ← NNReal.mul_rpow, NNReal.rpow_le_rpow_iff hp]
state_before: case h
α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ ∀ᵐ (a : α) ∂μ, ↑(‖f a‖₊ ^ p) ≤ ↑(c ^ p * ‖g a‖₊ ^ p)

tactic: exact h
state_before: case h
α : Type u_1
E : Type ?u.5053293
F : Type u_2
G : Type u_3
m m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
g : α → G
c : ℝ≥0
h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊
p : ℝ
hp : 0 < p
⊢ ∀ᵐ (a : α) ∂μ, ‖f a‖₊ ≤ c * ‖g a‖₊
Theorem: ClosureOperator.closure_sup_closure
File: Mathlib/Order/Closure.lean

tactic: rw [closure_sup_closure_left, closure_sup_closure_right]
state_before: α : Type u_1
ι : Sort ?u.9874
κ : ι → Sort ?u.9879
inst✝ : SemilatticeSup α
c : ClosureOperator α
x y : α
⊢ ↑c.toOrderHom (↑c.toOrderHom x ⊔ ↑c.toOrderHom y) = ↑c.toOrderHom (x ⊔ y)
Theorem: CategoryTheory.mono_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✝¹ : Mono f
g : Y ⟶ Z
inst✝ : Mono g
⊢ Mono (f ≫ g)

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

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

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

tactic: simpa using w
state_before: case right_cancellation
C : Type u
inst✝² : Category C
X✝ Y✝ Z✝¹ X Y Z✝ : C
f : X ⟶ Y
inst✝¹ : Mono f
g : Y ⟶ Z✝
inst✝ : Mono g
Z : C
a b : Z ⟶ X
w : a ≫ f ≫ g = b ≫ f ≫ g
⊢ (a ≫ f) ≫ g = (b ≫ f) ≫ g
Theorem: Real.dist_le_of_mem_Icc
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simpa only [Real.dist_eq, abs_of_nonpos (sub_nonpos.2 <| hx.1.trans hx.2), neg_sub] using
  Real.dist_le_of_mem_uIcc (Icc_subset_uIcc hx) (Icc_subset_uIcc hy)
state_before: α : Type u
β : Type v
X : Type ?u.196294
ι : Type ?u.196297
inst✝ : PseudoMetricSpace α
x y x' y' : ℝ
hx : x ∈ Icc x' y'
hy : y ∈ Icc x' y'
⊢ dist x y ≤ y' - x'
Theorem: AffineSubspace.vadd_mem_iff_mem_direction
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simpa using vsub_mem_direction h hp
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
v : V
p : P
hp : p ∈ s
h : v +ᵥ p ∈ s
⊢ v ∈ direction s
Theorem: List.mem_keys_kerase_of_ne
File: Mathlib/Data/List/Sigma.lean

tactic: simpa [keys, h] using p
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : a₁ ≠ a₂
p✝ : a₁ ∈ keys l
w✝² : β a₂
w✝¹ w✝ : List (Sigma β)
left✝ : ¬a₂ ∈ keys w✝¹
p : a₁ ∈ keys (w✝¹ ++ { fst := a₂, snd := w✝² } :: w✝)
q : a₂ ∈ keys (w✝¹ ++ { fst := a₂, snd := w✝² } :: w✝)
⊢ a₁ ∈ keys (w✝¹ ++ w✝)

tactic: simp [q, p]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : a₁ ≠ a₂
p : a₁ ∈ keys l
q : ¬a₂ ∈ keys l
⊢ a₁ ∈ keys (kerase a₂ l)
Theorem: Int.ne_of_lt
File: Std/Data/Int/Lemmas.lean

tactic: cases e
state_before: a b : Int
h : a < b
e : a = b
⊢ False

tactic: exact Int.lt_irrefl _ h
state_before: case refl
a : Int
h : a < a
⊢ False
Theorem: orderOf_neg_one
File: Mathlib/Algebra/CharP/Two.lean

tactic: split_ifs with h
state_before: R : Type u_1
ι : Type ?u.24466
inst✝¹ : Ring R
inst✝ : Nontrivial R
⊢ orderOf (-1) = if ringChar R = 2 then 1 else 2

tactic: apply orderOf_eq_prime
state_before: case inr
R : Type u_1
ι : Type ?u.24466
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ¬ringChar R = 2
⊢ orderOf (-1) = 2

tactic: simpa [neg_one_eq_one_iff] using h
state_before: case inr.hg1
R : Type u_1
ι : Type ?u.24466
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ¬ringChar R = 2
⊢ -1 ≠ 1

tactic: rw [neg_one_eq_one_iff.2 h, orderOf_one]
state_before: case inl
R : Type u_1
ι : Type ?u.24466
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ringChar R = 2
⊢ orderOf (-1) = 1

tactic: simp
state_before: case inr.hg
R : Type u_1
ι : Type ?u.24466
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ¬ringChar R = 2
⊢ (-1) ^ 2 = 1
Theorem: Compactum.continuous_of_hom
File: Mathlib/Topology/Category/Compactum.lean

tactic: rw [continuous_iff_ultrafilter]
state_before: X Y : Compactum
f : X ⟶ Y
⊢ Continuous f.f

tactic: intro x g h
state_before: X Y : Compactum
f : X ⟶ Y
⊢ ∀ (x : X.A) (g : Ultrafilter X.A), ↑g ≤ 𝓝 x → Tendsto f.f (↑g) (𝓝 (Monad.Algebra.Hom.f f x))

tactic: rw [Tendsto, ← coe_map]
state_before: X Y : Compactum
f : X ⟶ Y
x : X.A
g : Ultrafilter X.A
h : ↑g ≤ 𝓝 x
⊢ Tendsto f.f (↑g) (𝓝 (Monad.Algebra.Hom.f f x))

tactic: apply le_nhds_of_str_eq
state_before: X Y : Compactum
f : X ⟶ Y
x : X.A
g : Ultrafilter X.A
h : ↑g ≤ 𝓝 x
⊢ ↑(Ultrafilter.map f.f g) ≤ 𝓝 (Monad.Algebra.Hom.f f x)

tactic: rw [← str_hom_commute, str_eq_of_le_nhds _ x _]
state_before: case a
X Y : Compactum
f : X ⟶ Y
x : X.A
g : Ultrafilter X.A
h : ↑g ≤ 𝓝 x
⊢ str Y (Ultrafilter.map f.f g) = Monad.Algebra.Hom.f f x

tactic: apply h
state_before: X Y : Compactum
f : X ⟶ Y
x : X.A
g : Ultrafilter X.A
h : ↑g ≤ 𝓝 x
⊢ ↑g ≤ 𝓝 x
Theorem: Int.emod_two_ne_zero
File: Mathlib/Data/Int/Parity.lean

tactic: cases' emod_two_eq_zero_or_one n with h h <;> simp [h]
state_before: m n : ℤ
⊢ ¬n % 2 = 0 ↔ n % 2 = 1
Theorem: Nat.divisors_prime_pow
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext a
state_before: n p : ℕ
pp : Prime p
k : ℕ
⊢ divisors (p ^ k) = map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range (k + 1))

tactic: simp only [mem_divisors, mem_map, mem_range, lt_succ_iff, Function.Embedding.coeFn_mk, Nat.pow_eq,
  mem_divisors_prime_pow pp k]
state_before: case a
n p : ℕ
pp : Prime p
k a : ℕ
⊢ a ∈ divisors (p ^ k) ↔ a ∈ map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range (k + 1))

tactic: have := mem_divisors_prime_pow pp k (x := a)
state_before: case a
n p : ℕ
pp : Prime p
k a : ℕ
⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: rw [mem_divisors] at this
state_before: case a
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∈ divisors (p ^ k) ↔ ∃ j x, a = p ^ j
⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: rw [this]
state_before: case a
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: refine ⟨?_, ?_⟩
state_before: case a
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
⊢ (∃ j x, a = p ^ j) ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: intro h
state_before: case a.refine_1
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
⊢ (∃ j x, a = p ^ j) → ∃ a_2, a_2 ≤ k ∧ p ^ a_2 = a

tactic: rcases h with ⟨x, hx, hap⟩
state_before: case a.refine_1
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
h : ∃ j x, a = p ^ j
⊢ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: use x
state_before: case a.refine_1.intro.intro
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
x : ℕ
hx : x ≤ k
hap : a = p ^ x
⊢ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a

tactic: tauto
state_before: case a.refine_1.intro.intro
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
x : ℕ
hx : x ≤ k
hap : a = p ^ x
⊢ x ≤ k ∧ p ^ x = a

tactic: tauto
state_before: case a.refine_2
n p : ℕ
pp : Prime p
k a : ℕ
this : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j
⊢ (∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a) → ∃ j x, a = p ^ j
Theorem: CategoryTheory.Limits.BinaryFan.isLimit_iff_isIso_fst
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: constructor
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ Nonempty (IsLimit c) ↔ IsIso (fst c)

tactic: rintro ⟨H⟩
state_before: case mp
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ Nonempty (IsLimit c) → IsIso (fst c)

tactic: obtain ⟨l, hl, -⟩ := BinaryFan.IsLimit.lift' H (𝟙 X) (h.from X)
state_before: case mp.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
⊢ IsIso (fst c)

tactic: exact
  ⟨⟨l,
      BinaryFan.IsLimit.hom_ext H (by simpa [hl, -Category.comp_id] using Category.comp_id _)
        (h.hom_ext _ _),
      hl⟩⟩
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
l : X ⟶ c.pt
hl : l ≫ fst c = 𝟙 X
⊢ IsIso (fst c)

tactic: simpa [hl, -Category.comp_id] using Category.comp_id _
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
H : IsLimit c
l : X ⟶ c.pt
hl : l ≫ fst c = 𝟙 X
⊢ (fst c ≫ l) ≫ fst c = 𝟙 (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }) ≫ fst c

tactic: intro
state_before: case mpr
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
⊢ IsIso (fst c) → Nonempty (IsLimit c)

tactic: exact
  ⟨BinaryFan.IsLimit.mk _ (fun f _ => f ≫ inv c.fst) (fun _ _ => by simp)
      (fun _ _ => h.hom_ext _ _) fun _ _ _ e _ => by simp [← e]⟩
state_before: case mpr
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso (fst c)
⊢ Nonempty (IsLimit c)

tactic: simp
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso (fst c)
T✝ : C
x✝¹ : T✝ ⟶ X
x✝ : T✝ ⟶ Y
⊢ (fun {T} f x => f ≫ inv (fst c)) x✝¹ x✝ ≫ fst c = x✝¹

tactic: simp [← e]
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsTerminal Y
c : BinaryFan X Y
a✝ : IsIso (fst c)
T✝ : C
x✝³ : T✝ ⟶ X
x✝² : T✝ ⟶ Y
x✝¹ : T✝ ⟶ c.pt
e : x✝¹ ≫ fst c = x✝³
x✝ : x✝¹ ≫ snd c = x✝²
⊢ x✝¹ = (fun {T} f x => f ≫ inv (fst c)) x✝³ x✝²