tasksource/leandojo huggingface dataset:
Theorem: LinearMap.trace_transpose
File: Mathlib/LinearAlgebra/Trace.lean

tactic: let e := dualTensorHomEquiv R M M
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.401815
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.402357
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
⊢ comp (trace R (Module.Dual R M)) Module.Dual.transpose = trace R M

tactic: have h : Function.Surjective e.toLinearMap := e.surjective
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.401815
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.402357
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
e : Module.Dual R M ⊗[R] M ≃ₗ[R] M →ₗ[R] M := dualTensorHomEquiv R M M
⊢ comp (trace R (Module.Dual R M)) Module.Dual.transpose = trace R M

tactic: refine' (cancel_right h).1 _
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.401815
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.402357
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
e : Module.Dual R M ⊗[R] M ≃ₗ[R] M →ₗ[R] M := dualTensorHomEquiv R M M
h : Function.Surjective ↑↑e
⊢ comp (trace R (Module.Dual R M)) Module.Dual.transpose = trace R M

tactic: ext (f m)
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.401815
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.402357
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
e : Module.Dual R M ⊗[R] M ≃ₗ[R] M →ₗ[R] M := dualTensorHomEquiv R M M
h : Function.Surjective ↑↑e
⊢ comp (comp (trace R (Module.Dual R M)) Module.Dual.transpose) ↑e = comp (trace R M) ↑e

tactic: simp
state_before: case a.h.h
R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type ?u.401815
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.402357
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
e : Module.Dual R M ⊗[R] M ≃ₗ[R] M →ₗ[R] M := dualTensorHomEquiv R M M
h : Function.Surjective ↑↑e
f : Module.Dual R M
m : M
⊢ ↑(↑(AlgebraTensorModule.curry (comp (comp (trace R (Module.Dual R M)) Module.Dual.transpose) ↑e)) f) m =
    ↑(↑(AlgebraTensorModule.curry (comp (trace R M) ↑e)) f) m
Theorem: DoubleQuot.ker_quotLeftToQuotSup
File: Mathlib/RingTheory/Ideal/QuotientOperations.lean

tactic: simp only [mk_ker, sup_idem, sup_comm, quotLeftToQuotSup, Quotient.factor, ker_quotient_lift,
  map_eq_iff_sup_ker_eq_of_surjective (Ideal.Quotient.mk I) Quotient.mk_surjective, ← sup_assoc]
state_before: R : Type u
inst✝ : CommRing R
I J : Ideal R
⊢ RingHom.ker (quotLeftToQuotSup I J) = map (Ideal.Quotient.mk I) J
Theorem: Complex.tan_two_mul
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2
state_before: z : ℂ
⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)

tactic: rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)]
state_before: case pos
z : ℂ
h : ∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2
⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)

tactic: rw [not_forall_not] at h
state_before: case neg
z : ℂ
h : ¬∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2
⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)

tactic: rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)]
state_before: case neg
z : ℂ
h : ∃ x, z = (2 * ↑x + 1) * ↑π / 2
⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)
Theorem: IsGroupHom.preimage_normal
File: Mathlib/Deprecated/Subgroup.lean

tactic: simp [hf.map_one, hs.toIsSubgroup.one_mem]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.100510
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
s : Set H
hs : IsNormalSubgroup s
⊢ 1 ∈ f ⁻¹' s

tactic: simp (config := { contextual := true }) [hf.map_mul, hs.toIsSubgroup.mul_mem]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.100510
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
s : Set H
hs : IsNormalSubgroup s
⊢ ∀ {a b : G}, a ∈ f ⁻¹' s → b ∈ f ⁻¹' s → a * b ∈ f ⁻¹' s

tactic: simp (config := { contextual := true }) [hf.map_inv, hs.toIsSubgroup.inv_mem]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.100510
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
s : Set H
hs : IsNormalSubgroup s
⊢ ∀ {a : G}, a ∈ f ⁻¹' s → a⁻¹ ∈ f ⁻¹' s

tactic: simp (config := { contextual := true }) [hs.normal, hf.map_mul, hf.map_inv]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.100510
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
s : Set H
hs : IsNormalSubgroup s
⊢ ∀ (n : G), n ∈ f ⁻¹' s → ∀ (g : G), g * n * g⁻¹ ∈ f ⁻¹' s
Theorem: Lists.sizeof_pos
File: Mathlib/SetTheory/Lists.lean

tactic: cases l <;> simp only [Lists'.atom.sizeOf_spec, Lists'.nil.sizeOf_spec, Lists'.cons'.sizeOf_spec,
  true_or, add_pos_iff]
state_before: α : Type u_1
b : Bool
l : Lists' α b
⊢ 0 < sizeOf l
Theorem: CharTwo.add_self_eq_zero
File: Mathlib/Algebra/CharP/Two.lean

tactic: rw [← two_smul R x, two_eq_zero, zero_smul]
state_before: R : Type u_1
ι : Type ?u.734
inst✝¹ : Semiring R
inst✝ : CharP R 2
x : R
⊢ x + x = 0
Theorem: Algebra.TensorProduct.productMap_right_apply
File: Mathlib/RingTheory/TensorProduct.lean

tactic: simp
state_before: R : Type u_2
A : Type u_3
B : Type u_4
S : Type u_1
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Semiring B
inst✝³ : CommSemiring S
inst✝² : Algebra R A
inst✝¹ : Algebra R B
inst✝ : Algebra R S
f : A →ₐ[R] S
g : B →ₐ[R] S
b : B
⊢ ↑(productMap f g) (↑includeRight b) = ↑g b
Theorem: CategoryTheory.Limits.WidePullback.lift_base
File: Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean

tactic: simp only [limit.lift_π, WidePullbackShape.mkCone_pt, WidePullbackShape.mkCone_π_app]
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → objs j ⟶ B
inst✝ : HasWidePullback B objs arrows
X : D
f : X ⟶ B
fs : (j : J) → X ⟶ objs j
w : ∀ (j : J), fs j ≫ arrows j = f
⊢ lift f fs w ≫ base arrows = f
Theorem: Units.isUnit_mul_units
File: Mathlib/Algebra/Group/Units.lean

tactic: have : IsUnit (a * ↑u * ↑u⁻¹) := by exists v * u⁻¹; rw [← hv, Units.val_mul]
state_before: α : Type u
M : Type u_1
N : Type ?u.60568
inst✝ : Monoid M
a : M
u : Mˣ
x✝ : IsUnit (a * ↑u)
v : Mˣ
hv : ↑v = a * ↑u
⊢ IsUnit a

tactic: rwa [mul_assoc, Units.mul_inv, mul_one] at this
state_before: α : Type u
M : Type u_1
N : Type ?u.60568
inst✝ : Monoid M
a : M
u : Mˣ
x✝ : IsUnit (a * ↑u)
v : Mˣ
hv : ↑v = a * ↑u
this : IsUnit (a * ↑u * ↑u⁻¹)
⊢ IsUnit a

tactic: exists v * u⁻¹
state_before: α : Type u
M : Type u_1
N : Type ?u.60568
inst✝ : Monoid M
a : M
u : Mˣ
x✝ : IsUnit (a * ↑u)
v : Mˣ
hv : ↑v = a * ↑u
⊢ IsUnit (a * ↑u * ↑u⁻¹)

tactic: rw [← hv, Units.val_mul]
state_before: α : Type u
M : Type u_1
N : Type ?u.60568
inst✝ : Monoid M
a : M
u : Mˣ
x✝ : IsUnit (a * ↑u)
v : Mˣ
hv : ↑v = a * ↑u
⊢ ↑(v * u⁻¹) = a * ↑u * ↑u⁻¹
Theorem: IsCompact.elim_finite_subcover_image
File: Mathlib/Topology/SubsetProperties.lean

tactic: simp only [Subtype.forall', biUnion_eq_iUnion] at hc₁ hc₂
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type ?u.23729
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
b : Set ι
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (i : ι), i ∈ b → IsOpen (c i)
hc₂ : s ⊆ ⋃ (i : ι) (_ : i ∈ b), c i
⊢ ∃ b', b' ⊆ b ∧ Set.Finite b' ∧ s ⊆ ⋃ (i : ι) (_ : i ∈ b'), c i

tactic: rcases hs.elim_finite_subcover (fun i => c i : b → Set α) hc₁ hc₂ with ⟨d, hd⟩
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type ?u.23729
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
b : Set ι
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (x : { a // a ∈ b }), IsOpen (c ↑x)
hc₂ : s ⊆ ⋃ (x : ↑b), c ↑x
⊢ ∃ b', b' ⊆ b ∧ Set.Finite b' ∧ s ⊆ ⋃ (i : ι) (_ : i ∈ b'), c i

tactic: refine' ⟨Subtype.val '' d.toSet, _, d.finite_toSet.image _, _⟩
state_before: case intro
α : Type u
β : Type v
ι : Type u_1
π : ι → Type ?u.23729
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
b : Set ι
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (x : { a // a ∈ b }), IsOpen (c ↑x)
hc₂ : s ⊆ ⋃ (x : ↑b), c ↑x
d : Finset ↑b
hd : s ⊆ ⋃ (i : ↑b) (_ : i ∈ d), c ↑i
⊢ ∃ b', b' ⊆ b ∧ Set.Finite b' ∧ s ⊆ ⋃ (i : ι) (_ : i ∈ b'), c i

tactic: simp
state_before: case intro.refine'_1
α : Type u
β : Type v
ι : Type u_1
π : ι → Type ?u.23729
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
b : Set ι
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (x : { a // a ∈ b }), IsOpen (c ↑x)
hc₂ : s ⊆ ⋃ (x : ↑b), c ↑x
d : Finset ↑b
hd : s ⊆ ⋃ (i : ↑b) (_ : i ∈ d), c ↑i
⊢ Subtype.val '' ↑d ⊆ b

tactic: rwa [biUnion_image]
state_before: case intro.refine'_2
α : Type u
β : Type v
ι : Type u_1
π : ι → Type ?u.23729
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
b : Set ι
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (x : { a // a ∈ b }), IsOpen (c ↑x)
hc₂ : s ⊆ ⋃ (x : ↑b), c ↑x
d : Finset ↑b
hd : s ⊆ ⋃ (i : ↑b) (_ : i ∈ d), c ↑i
⊢ s ⊆ ⋃ (i : ι) (_ : i ∈ Subtype.val '' ↑d), c i
Theorem: Finset.eq_prod_range_div
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [prod_range_div, mul_div_cancel'_right]
state_before: ι : Type ?u.620604
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
M : Type u_1
inst✝ : CommGroup M
f : ℕ → M
n : ℕ
⊢ f n = f 0 * ∏ i in range n, f (i + 1) / f i
Theorem: Ordinal.sub_sub
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [sub_le, sub_le, sub_le, add_assoc]
state_before: α : Type ?u.132845
β : Type ?u.132848
γ : Type ?u.132851
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c d : Ordinal
⊢ a - b - c ≤ d ↔ a - (b + c) ≤ d
Theorem: ContDiffWithinAt.div_const
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: simpa only [div_eq_mul_inv] using hf.mul contDiffWithinAt_const
state_before: 𝕜 : Type u_1
inst✝¹⁶ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹⁵ : NormedAddCommGroup D
inst✝¹⁴ : NormedSpace 𝕜 D
E : Type uE
inst✝¹³ : NormedAddCommGroup E
inst✝¹² : NormedSpace 𝕜 E
F : Type uF
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜 F
G : Type uG
inst✝⁹ : NormedAddCommGroup G
inst✝⁸ : NormedSpace 𝕜 G
X : Type ?u.1990293
inst✝⁷ : NormedAddCommGroup X
inst✝⁶ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x x₀ : E
c✝ : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
𝔸 : Type ?u.1993771
𝔸' : Type ?u.1993774
ι : Type ?u.1993777
𝕜' : Type u_2
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedAlgebra 𝕜 𝔸
inst✝³ : NormedCommRing 𝔸'
inst✝² : NormedAlgebra 𝕜 𝔸'
inst✝¹ : NormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
f : E → 𝕜'
n : ℕ∞
hf : ContDiffWithinAt 𝕜 n f s x
c : 𝕜'
⊢ ContDiffWithinAt 𝕜 n (fun x => f x / c) s x
Theorem: prod_eq_generateFrom
File: Mathlib/Topology/Constructions.lean

tactic: simpa [Set.prod_eq] using ht
state_before: α : Type u
β : Type v
γ : Type ?u.45579
δ : Type ?u.45582
ε : Type ?u.45585
ζ : Type ?u.45588
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
t : Set α
ht : t ∈ fun s' => inst✝⁵.1 s'
⊢ IsOpen t ∧ IsOpen univ ∧ Prod.fst ⁻¹' t = t ×ˢ univ

tactic: simpa [Set.prod_eq] using ht
state_before: α : Type u
β : Type v
γ : Type ?u.45579
δ : Type ?u.45582
ε : Type ?u.45585
ζ : Type ?u.45588
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
t : Set β
ht : t ∈ fun s' => inst✝⁴.1 s'
⊢ IsOpen univ ∧ IsOpen t ∧ Prod.snd ⁻¹' t = univ ×ˢ t
Theorem: Set.Nonempty.div_zero
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simpa [mem_div] using hs
state_before: F : Type ?u.147363
α : Type u_1
β : Type ?u.147369
γ : Type ?u.147372
inst✝ : GroupWithZero α
s t : Set α
hs : Set.Nonempty s
⊢ 0 ⊆ s / 0
Theorem: Real.isLittleO_pow_log_id_atTop
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [Asymptotics.isLittleO_iff_tendsto']
state_before: x y : ℝ
n : ℕ
⊢ (fun x => log x ^ n) =o[atTop] id

tactic: filter_upwards [eventually_ne_atTop (0 : ℝ)] with x h₁ h₂ using (h₁ h₂).elim
state_before: x y : ℝ
n : ℕ
⊢ ∀ᶠ (x : ℝ) in atTop, id x = 0 → log x ^ n = 0

tactic: simpa using tendsto_pow_log_div_mul_add_atTop 1 0 n one_ne_zero
state_before: x y : ℝ
n : ℕ
⊢ Tendsto (fun x => log x ^ n / id x) atTop (𝓝 0)
Theorem: Computation.terminates_def
File: Mathlib/Data/Seq/Computation.lean

tactic: dsimp [Stream'.nth] at h
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
x✝ : Terminates s
a : α
n : ℕ
h : (fun b => some a = b) (Stream'.nth (↑s) n)
⊢ Option.isSome (↑s n) = true

tactic: rw [← h]
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
x✝ : Terminates s
a : α
n : ℕ
h : some a = ↑s n
⊢ Option.isSome (↑s n) = true

tactic: exact rfl
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
x✝ : Terminates s
a : α
n : ℕ
h : some a = ↑s n
⊢ Option.isSome (some a) = true
Theorem: FirstOrder.Language.BoundedFormula.not_ex_isQF
File: Mathlib/ModelTheory/Syntax.lean

tactic: cases' con with _ con _ _ con
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.113957
P : Type ?u.113960
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.113988
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
φ : BoundedFormula L α (n + 1)
con : IsQF (BoundedFormula.ex φ)
⊢ False

tactic: exact φ.not_ex_isAtomic con
state_before: case of_isAtomic
L : Language
L' : Language
M : Type w
N : Type ?u.113957
P : Type ?u.113960
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.113988
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
φ : BoundedFormula L α (n + 1)
con : IsAtomic (BoundedFormula.ex φ)
⊢ False

tactic: exact not_all_isQF _ con
state_before: case imp
L : Language
L' : Language
M : Type w
N : Type ?u.113957
P : Type ?u.113960
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.113988
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
φ : BoundedFormula L α (n + 1)
con : IsQF (all (BoundedFormula.not φ))
h₂✝ : IsQF ⊥
⊢ False
Theorem: MeasureTheory.SignedMeasure.totalVariation_neg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: simp [totalVariation, toJordanDecomposition_neg, add_comm]
state_before: α : Type u_1
β : Type ?u.87567
inst✝ : MeasurableSpace α
s : SignedMeasure α
⊢ totalVariation (-s) = totalVariation s
Theorem: CategoryTheory.Functor.map_isPushout
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: refine'
  IsPushout.of_isColimit' (F.map_commSq s.toCommSq)
    (IsColimit.equivOfNatIsoOfIso (spanCompIso F f g) _ _ (WalkingSpan.ext _ _ _)
      (isColimitOfPreserves F s.isColimit))
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ IsPushout (F.map f) (F.map g) (F.map h) (F.map i)

tactic: rfl
state_before: case refine'_1
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone (IsPushout.cocone s))).pt ≅
    (CommSq.cocone (_ : CommSq (F.map f) (F.map g) (F.map h) (F.map i))).pt

tactic: simp
state_before: case refine'_2
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone (IsPushout.cocone s))).ι.app WalkingCospan.left ≫
      (Iso.refl ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone (IsPushout.cocone s))).pt).hom =
    (CommSq.cocone (_ : CommSq (F.map f) (F.map g) (F.map h) (F.map i))).ι.app WalkingCospan.left

tactic: simp
state_before: case refine'_3
C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone (IsPushout.cocone s))).ι.app WalkingCospan.right ≫
      (Iso.refl ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone (IsPushout.cocone s))).pt).hom =
    (CommSq.cocone (_ : CommSq (F.map f) (F.map g) (F.map h) (F.map i))).ι.app WalkingCospan.right
Theorem: Fin.coe_pred
File: Mathlib/Data/Fin/Basic.lean

tactic: cases j
state_before: n m : ℕ
j : Fin (n + 1)
h : j ≠ 0
⊢ ↑(pred j h) = ↑j - 1

tactic: rfl
state_before: case mk
n m val✝ : ℕ
isLt✝ : val✝ < n + 1
h : { val := val✝, isLt := isLt✝ } ≠ 0
⊢ ↑(pred { val := val✝, isLt := isLt✝ } h) = ↑{ val := val✝, isLt := isLt✝ } - 1
Theorem: irrational_div_nat_iff
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [← cast_coe_nat, irrational_div_rat_iff, Nat.cast_ne_zero]
state_before: q : ℚ
m : ℤ
n : ℕ
x : ℝ
⊢ Irrational (x / ↑n) ↔ n ≠ 0 ∧ Irrational x
Theorem: Equiv.Perm.map_finRange_perm
File: Mathlib/Data/List/FinRange.lean

tactic: rw [perm_ext ((nodup_finRange n).map σ.injective) <| nodup_finRange n]
state_before: n : ℕ
σ : Perm (Fin n)
⊢ map (↑σ) (finRange n) ~ finRange n

tactic: simpa [mem_map, mem_finRange, true_and_iff, iff_true_iff] using σ.surjective
state_before: n : ℕ
σ : Perm (Fin n)
⊢ ∀ (a : Fin n), a ∈ map (↑σ) (finRange n) ↔ a ∈ finRange n
Theorem: Polynomial.tendsto_abv_atTop
File: Mathlib/Topology/Algebra/Polynomial.lean

tactic: apply tendsto_abv_eval₂_atTop _ _ _ h _ hz
state_before: R : Type u_1
k : Type u_2
α : Type u_3
inst✝² : Ring R
inst✝¹ : LinearOrderedField k
abv : R → k
inst✝ : IsAbsoluteValue abv
p : R[X]
h : 0 < degree p
l : Filter α
z : α → R
hz : Tendsto (abv ∘ z) l atTop
⊢ Tendsto (fun x => abv (eval (z x) p)) l atTop

tactic: exact (mt leadingCoeff_eq_zero.1 (ne_zero_of_degree_gt h))
state_before: R : Type u_1
k : Type u_2
α : Type u_3
inst✝² : Ring R
inst✝¹ : LinearOrderedField k
abv : R → k
inst✝ : IsAbsoluteValue abv
p : R[X]
h : 0 < degree p
l : Filter α
z : α → R
hz : Tendsto (abv ∘ z) l atTop
⊢ ↑(RingHom.id R) (leadingCoeff p) ≠ 0
Theorem: Wbtw.mem_affineSpan
File: Mathlib/Analysis/Convex/Between.lean

tactic: rcases h with ⟨r, ⟨-, rfl⟩⟩
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.142618
P : Type u_3
P' : Type ?u.142624
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
h : Wbtw R x y z
⊢ y ∈ affineSpan R {x, z}

tactic: exact lineMap_mem_affineSpan_pair _ _ _
state_before: case intro.intro
R : Type u_1
V : Type u_2
V' : Type ?u.142618
P : Type u_3
P' : Type ?u.142624
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
r : R
⊢ ↑(lineMap x z) r ∈ affineSpan R {x, z}
Theorem: sign_eq_of_affineCombination_mem_affineSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [affineCombination_mem_affineSpan_pair h hw hw₁ hw₂] at hs
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w w₁ w₂ : ι → k
s : Finset ι
hw : ∑ i in s, w i = 1
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
hs :
  ↑(Finset.affineCombination k s p) w ∈
    affineSpan k {↑(Finset.affineCombination k s p) w₁, ↑(Finset.affineCombination k s p) w₂}
i j : ι
hi : i ∈ s
hj : j ∈ s
hi0 : w₁ i = 0
hj0 : w₁ j = 0
hij : ↑SignType.sign (w₂ i) = ↑SignType.sign (w₂ j)
⊢ ↑SignType.sign (w i) = ↑SignType.sign (w j)

tactic: rcases hs with ⟨r, hr⟩
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w w₁ w₂ : ι → k
s : Finset ι
hw : ∑ i in s, w i = 1
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
hs : ∃ r, ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i
i j : ι
hi : i ∈ s
hj : j ∈ s
hi0 : w₁ i = 0
hj0 : w₁ j = 0
hij : ↑SignType.sign (w₂ i) = ↑SignType.sign (w₂ j)
⊢ ↑SignType.sign (w i) = ↑SignType.sign (w j)

tactic: dsimp only at hr
state_before: case intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w w₁ w₂ : ι → k
s : Finset ι
hw : ∑ i in s, w i = 1
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
i j : ι
hi : i ∈ s
hj : j ∈ s
hi0 : w₁ i = 0
hj0 : w₁ j = 0
hij : ↑SignType.sign (w₂ i) = ↑SignType.sign (w₂ j)
r : k
hr : ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i
⊢ ↑SignType.sign (w i) = ↑SignType.sign (w j)

tactic: rw [hr i hi, hr j hj, hi0, hj0, add_zero, add_zero, sub_zero, sub_zero, sign_mul, sign_mul, hij]
state_before: case intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w w₁ w₂ : ι → k
s : Finset ι
hw : ∑ i in s, w i = 1
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
i j : ι
hi : i ∈ s
hj : j ∈ s
hi0 : w₁ i = 0
hj0 : w₁ j = 0
hij : ↑SignType.sign (w₂ i) = ↑SignType.sign (w₂ j)
r : k
hr : ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i
⊢ ↑SignType.sign (w i) = ↑SignType.sign (w j)
Theorem: Polynomial.leadingCoeff_smul_of_smul_regular
File: Mathlib/Data/Polynomial/Monic.lean

tactic: rw [Polynomial.leadingCoeff, Polynomial.leadingCoeff, coeff_smul,
  natDegree_smul_of_smul_regular p h]
state_before: R : Type u
S✝ : Type v
a b : R
m n : ℕ
ι : Type y
inst✝² : Semiring R
p✝ : R[X]
S : Type u_1
inst✝¹ : Monoid S
inst✝ : DistribMulAction S R
k : S
p : R[X]
h : IsSMulRegular R k
⊢ leadingCoeff (k • p) = k • leadingCoeff p
Theorem: Pell.eq_pell
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: rw [zero_tsub] at hp
state_before: a : ℕ
a1 : 1 < a
x y : ℕ
hp✝ : x * x - Pell.d a1 * y * y = 1
hp : 0 - Pell.d a1 * y * y = 1
⊢ 1 ≤ { re := ↑0, im := ↑y }

tactic: contradiction
state_before: a : ℕ
a1 : 1 < a
x y : ℕ
hp✝ : x * x - Pell.d a1 * y * y = 1
hp : 0 = 1
⊢ 1 ≤ { re := ↑0, im := ↑y }
Theorem: pow_le_pow_of_le_one
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: let ⟨k, hk⟩ := Nat.exists_eq_add_of_le hij
state_before: α : Type ?u.303316
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i j : ℕ
hij : i ≤ j
⊢ a ^ j ≤ a ^ i

tactic: rw [hk]
state_before: α : Type ?u.303316
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i j : ℕ
hij : i ≤ j
k : ℕ
hk : j = i + k
⊢ a ^ j ≤ a ^ i

tactic: exact pow_le_pow_of_le_one_aux h ha _ _
state_before: α : Type ?u.303316
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i j : ℕ
hij : i ≤ j
k : ℕ
hk : j = i + k
⊢ a ^ (i + k) ≤ a ^ i
Theorem: List.chain_singleton
File: Mathlib/Data/List/Chain.lean

tactic: simp only [chain_cons, Chain.nil, and_true_iff]
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a✝ b✝ a b : α
⊢ Chain R a [b] ↔ R a b
Theorem: Int.negSucc_not_nonneg
File: Std/Data/Int/Lemmas.lean

tactic: simp only [Int.not_le, iff_false]
state_before: n : Nat
⊢ 0 ≤ -[n+1] ↔ False

tactic: exact Int.negSucc_lt_zero n
state_before: n : Nat
⊢ -[n+1] < 0