tasksource/leandojo huggingface dataset:
Theorem: QuadraticForm.polar_smul_left_of_tower
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [← IsScalarTower.algebraMap_smul R a x, polar_smul_left, Algebra.smul_def]
state_before: S : Type u_3
R : Type u_1
R₁ : Type ?u.185856
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : CommRing R₁
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
inst✝³ : CommSemiring S
inst✝² : Algebra S R
inst✝¹ : Module S M
inst✝ : IsScalarTower S R M
a : S
x y : M
⊢ polar (↑Q) (a • x) y = a • polar (↑Q) x y
Theorem: CategoryTheory.Limits.map_π_preserves_coequalizer_inv_colimMap_desc
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean

tactic: slice_lhs 1 3 => rw [map_π_preserves_coequalizer_inv_colimMap]
state_before: C : Type u₁
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
G : C ⥤ D
X Y Z : C
f g : X ⟶ Y
h✝ : Y ⟶ Z
w : f ≫ h✝ = g ≫ h✝
inst✝³ : HasCoequalizer f g
inst✝² : HasCoequalizer (G.map f) (G.map g)
inst✝¹ : PreservesColimit (parallelPair f g) G
X' Y' : D
f' g' : X' ⟶ Y'
inst✝ : HasCoequalizer f' g'
p : G.obj X ⟶ X'
q : G.obj Y ⟶ Y'
wf : G.map f ≫ q = p ≫ f'
wg : G.map g ≫ q = p ≫ g'
Z' : D
h : Y' ⟶ Z'
wh : f' ≫ h = g' ≫ h
⊢ G.map (coequalizer.π f g) ≫
      (PreservesCoequalizer.iso G f g).inv ≫
        colimMap (parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) ≫ coequalizer.desc h wh =
    q ≫ h

tactic: slice_lhs 2 3 => rw [coequalizer.π_desc]
state_before: C : Type u₁
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
G : C ⥤ D
X Y Z : C
f g : X ⟶ Y
h✝ : Y ⟶ Z
w : f ≫ h✝ = g ≫ h✝
inst✝³ : HasCoequalizer f g
inst✝² : HasCoequalizer (G.map f) (G.map g)
inst✝¹ : PreservesColimit (parallelPair f g) G
X' Y' : D
f' g' : X' ⟶ Y'
inst✝ : HasCoequalizer f' g'
p : G.obj X ⟶ X'
q : G.obj Y ⟶ Y'
wf : G.map f ≫ q = p ≫ f'
wg : G.map g ≫ q = p ≫ g'
Z' : D
h : Y' ⟶ Z'
wh : f' ≫ h = g' ≫ h
⊢ (q ≫ coequalizer.π f' g') ≫ coequalizer.desc h wh = q ≫ h
Theorem: Pullback.continuous_lift
File: Mathlib/Topology/FiberBundle/Constructions.lean

tactic: rw [continuous_iff_le_induced, Pullback.TotalSpace.topologicalSpace, pullbackTopology_def]
state_before: B : Type u
F : Type v
E : B → Type w₁
B' : Type w₂
f✝ : B' → B
inst✝¹ : TopologicalSpace B'
inst✝ : TopologicalSpace (TotalSpace E)
f : B' → B
⊢ Continuous (Pullback.lift f)

tactic: exact inf_le_right
state_before: B : Type u
F : Type v
E : B → Type w₁
B' : Type w₂
f✝ : B' → B
inst✝¹ : TopologicalSpace B'
inst✝ : TopologicalSpace (TotalSpace E)
f : B' → B
⊢ induced TotalSpace.proj inst✝¹ ⊓ induced (Pullback.lift f) inst✝ ≤ induced (Pullback.lift f) inst✝
Theorem: nhds_ne_subtype_neBot_iff
File: Mathlib/Topology/Constructions.lean

tactic: rw [neBot_iff, neBot_iff, not_iff_not, nhds_ne_subtype_eq_bot_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.13040
δ : Type ?u.13043
ε : Type ?u.13046
ζ : Type ?u.13049
inst✝ : TopologicalSpace α
S : Set α
x : ↑S
⊢ NeBot (𝓝[{x}ᶜ] x) ↔ NeBot (𝓝[{↑x}ᶜ] ↑x ⊓ 𝓟 S)
Theorem: zsmul_eq_smul_cast
File: Mathlib/Algebra/Module/Basic.lean

tactic: apply AddMonoidHom.ext_int
state_before: α : Type ?u.146146
R : Type u_2
k : Type ?u.146152
S : Type ?u.146155
M : Type u_1
M₂ : Type ?u.146161
M₃ : Type ?u.146164
ι : Type ?u.146167
inst✝⁴ : Semiring S
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module S M
inst✝ : Module R M
n : ℤ
b : M
⊢ ↑(AddMonoidHom.flip (smulAddHom ℤ M)) b =
    AddMonoidHom.comp (↑(AddMonoidHom.flip (smulAddHom R M)) b) (Int.castAddHom R)

tactic: simp
state_before: case h1
α : Type ?u.146146
R : Type u_2
k : Type ?u.146152
S : Type ?u.146155
M : Type u_1
M₂ : Type ?u.146161
M₃ : Type ?u.146164
ι : Type ?u.146167
inst✝⁴ : Semiring S
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module S M
inst✝ : Module R M
n : ℤ
b : M
⊢ ↑(↑(AddMonoidHom.flip (smulAddHom ℤ M)) b) 1 =
    ↑(AddMonoidHom.comp (↑(AddMonoidHom.flip (smulAddHom R M)) b) (Int.castAddHom R)) 1
Theorem: RingEquiv.toNonUnitalRingHomm_comp_symm_toNonUnitalRingHom
File: Mathlib/Algebra/Ring/Equiv.lean

tactic: ext
state_before: F : Type ?u.86101
α : Type ?u.86104
β : Type ?u.86107
R : Type u_1
S : Type u_2
S' : Type ?u.86116
inst✝² : NonUnitalNonAssocSemiring R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring S'
e : R ≃+* S
⊢ NonUnitalRingHom.comp (toNonUnitalRingHom e) (toNonUnitalRingHom (RingEquiv.symm e)) = NonUnitalRingHom.id S

tactic: simp
state_before: case a
F : Type ?u.86101
α : Type ?u.86104
β : Type ?u.86107
R : Type u_1
S : Type u_2
S' : Type ?u.86116
inst✝² : NonUnitalNonAssocSemiring R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring S'
e : R ≃+* S
x✝ : S
⊢ ↑(NonUnitalRingHom.comp (toNonUnitalRingHom e) (toNonUnitalRingHom (RingEquiv.symm e))) x✝ =
    ↑(NonUnitalRingHom.id S) x✝
Theorem: Nat.sq_sub_sq
File: Mathlib/Data/Nat/Pow.lean

tactic: rw [sq, sq]
state_before: a b : ℕ
⊢ a ^ 2 - b ^ 2 = (a + b) * (a - b)

tactic: exact Nat.mul_self_sub_mul_self_eq a b
state_before: a b : ℕ
⊢ a * a - b * b = (a + b) * (a - b)
Theorem: Int.gcd_eq_zero_iff
File: Mathlib/Data/Int/GCD.lean

tactic: rw [gcd, Nat.gcd_eq_zero_iff, natAbs_eq_zero, natAbs_eq_zero]
state_before: i j : ℤ
⊢ gcd i j = 0 ↔ i = 0 ∧ j = 0
Theorem: AlgEquiv.map_smul
File: Mathlib/Algebra/Algebra/Equiv.lean

tactic: simp only [Algebra.smul_def, map_mul, commutes]
state_before: R : Type u
A₁ : Type v
A₂ : Type w
A₃ : Type u₁
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A₁
inst✝⁴ : Semiring A₂
inst✝³ : Semiring A₃
inst✝² : Algebra R A₁
inst✝¹ : Algebra R A₂
inst✝ : Algebra R A₃
e : A₁ ≃ₐ[R] A₂
r : R
x : A₁
⊢ ↑e (r • x) = r • ↑e x
Theorem: Nat.pow_factors_toFinset
File: Mathlib/Data/Nat/PrimeFin.lean

tactic: cases k
state_before: n k : ℕ
hk : k ≠ 0
⊢ List.toFinset (factors (n ^ k)) = List.toFinset (factors n)

tactic: rw [pow_succ_factors_toFinset]
state_before: case succ
n n✝ : ℕ
hk : succ n✝ ≠ 0
⊢ List.toFinset (factors (n ^ succ n✝)) = List.toFinset (factors n)

tactic: simp at hk
state_before: case zero
n : ℕ
hk : zero ≠ 0
⊢ List.toFinset (factors (n ^ zero)) = List.toFinset (factors n)
Theorem: Complex.ofReal_sub
File: Mathlib/Data/Complex/Basic.lean

tactic: simp [ofReal']
state_before: r s : ℝ
⊢ (↑(r - s)).re = (↑r - ↑s).re ∧ (↑(r - s)).im = (↑r - ↑s).im
Theorem: ENNReal.le_ofReal_iff_toReal_le
File: Mathlib/Data/Real/ENNReal.lean

tactic: lift a to ℝ≥0 using ha
state_before: α : Type ?u.811667
β : Type ?u.811670
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
b : ℝ
ha : a ≠ ⊤
hb : 0 ≤ b
⊢ a ≤ ENNReal.ofReal b ↔ ENNReal.toReal a ≤ b

tactic: simpa [ENNReal.ofReal, ENNReal.toReal] using Real.le_toNNReal_iff_coe_le hb
state_before: case intro
α : Type ?u.811667
β : Type ?u.811670
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
b : ℝ
hb : 0 ≤ b
a : ℝ≥0
⊢ ↑a ≤ ENNReal.ofReal b ↔ ENNReal.toReal ↑a ≤ b
Theorem: Filter.mem_biInf_of_directed
File: Mathlib/Order/Filter/Basic.lean

tactic: haveI := ne.to_subtype
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.96376
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : β → Filter α
s : Set β
h : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
⊢ (t ∈ ⨅ (i : β) (_ : i ∈ s), f i) ↔ ∃ i, i ∈ s ∧ t ∈ f i

tactic: simp_rw [iInf_subtype', mem_iInf_of_directed h.directed_val, Subtype.exists, exists_prop]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.96376
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : β → Filter α
s : Set β
h : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
this : Nonempty ↑s
⊢ (t ∈ ⨅ (i : β) (_ : i ∈ s), f i) ↔ ∃ i, i ∈ s ∧ t ∈ f i
Theorem: Finset.pow_subset_pow_of_one_mem
File: Mathlib/Data/Finset/Pointwise.lean

tactic: apply Nat.le_induction
state_before: F : Type ?u.352257
α : Type u_1
β : Type ?u.352263
γ : Type ?u.352266
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a : α
m n : ℕ
hs : 1 ∈ s
⊢ m ≤ n → s ^ m ⊆ s ^ n

tactic: exact fun _ hn => hn
state_before: case base
F : Type ?u.352257
α : Type u_1
β : Type ?u.352263
γ : Type ?u.352266
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a : α
m n : ℕ
hs : 1 ∈ s
⊢ s ^ m ⊆ s ^ m

tactic: intro n _ hmn
state_before: case succ
F : Type ?u.352257
α : Type u_1
β : Type ?u.352263
γ : Type ?u.352266
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a : α
m n : ℕ
hs : 1 ∈ s
⊢ ∀ (n : ℕ), m ≤ n → s ^ m ⊆ s ^ n → s ^ m ⊆ s ^ (n + 1)

tactic: rw [pow_succ]
state_before: case succ
F : Type ?u.352257
α : Type u_1
β : Type ?u.352263
γ : Type ?u.352266
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a : α
m n✝ : ℕ
hs : 1 ∈ s
n : ℕ
hn✝ : m ≤ n
hmn : s ^ m ⊆ s ^ n
⊢ s ^ m ⊆ s ^ (n + 1)

tactic: exact hmn.trans (subset_mul_right (s ^ n) hs)
state_before: case succ
F : Type ?u.352257
α : Type u_1
β : Type ?u.352263
γ : Type ?u.352266
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : Monoid α
s t : Finset α
a : α
m n✝ : ℕ
hs : 1 ∈ s
n : ℕ
hn✝ : m ≤ n
hmn : s ^ m ⊆ s ^ n
⊢ s ^ m ⊆ s * s ^ n
Theorem: isEmpty_plift
File: Mathlib/Logic/IsEmpty.lean

tactic: simp only [← not_nonempty_iff, nonempty_plift]
state_before: α✝ : Sort ?u.3700
β : Sort ?u.3703
γ : Sort ?u.3706
α : Sort u_1
⊢ IsEmpty (PLift α) ↔ IsEmpty α
Theorem: Setoid.rel_iff_exists_classes
File: Mathlib/Data/Setoid/Partition.lean

tactic: subst c
state_before: α : Type u_1
r : Setoid α
x y : α
x✝ : ∃ c, c ∈ classes r ∧ x ∈ c ∧ y ∈ c
c : Set α
z : α
hz : c = {x | Rel r x z}
hx : x ∈ c
hy : y ∈ c
⊢ Rel r x y

tactic: exact r.trans' hx (r.symm' hy)
state_before: α : Type u_1
r : Setoid α
x y : α
x✝ : ∃ c, c ∈ classes r ∧ x ∈ c ∧ y ∈ c
z : α
hx : x ∈ {x | Rel r x z}
hy : y ∈ {x | Rel r x z}
⊢ Rel r x y
Theorem: exists_pair_lt
File: Mathlib/Logic/Nontrivial.lean

tactic: rcases exists_pair_ne α with ⟨x, y, hxy⟩
state_before: α✝ : Type ?u.565
β : Type ?u.568
α : Type u_1
inst✝¹ : Nontrivial α
inst✝ : LinearOrder α
⊢ ∃ x y, x < y

tactic: cases lt_or_gt_of_ne hxy <;> exact ⟨_, _, ‹_›⟩
state_before: case intro.intro
α✝ : Type ?u.565
β : Type ?u.568
α : Type u_1
inst✝¹ : Nontrivial α
inst✝ : LinearOrder α
x y : α
hxy : x ≠ y
⊢ ∃ x y, x < y
Theorem: transpose_dualTensorHom
File: Mathlib/LinearAlgebra/Contraction.lean

tactic: ext (f' m')
state_before: ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
f : Dual R M
m : M
⊢ ↑Dual.transpose (↑(dualTensorHom R M M) (f ⊗ₜ[R] m)) =
    ↑(dualTensorHom R (Dual R M) (Dual R M)) (↑(Dual.eval R M) m ⊗ₜ[R] f)

tactic: simp only [Dual.transpose_apply, coe_comp, Function.comp_apply, dualTensorHom_apply,
  LinearMap.map_smulₛₗ, RingHom.id_apply, Algebra.id.smul_eq_mul, Dual.eval_apply,
  LinearMap.smul_apply]
state_before: case h.h
ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
f : Dual R M
m : M
f' : Dual R M
m' : M
⊢ ↑(↑(↑Dual.transpose (↑(dualTensorHom R M M) (f ⊗ₜ[R] m))) f') m' =
    ↑(↑(↑(dualTensorHom R (Dual R M) (Dual R M)) (↑(Dual.eval R M) m ⊗ₜ[R] f)) f') m'

tactic: exact mul_comm _ _
state_before: case h.h
ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
f : Dual R M
m : M
f' : Dual R M
m' : M
⊢ ↑f m' * ↑f' m = ↑f' m * ↑f m'
Theorem: Ordinal.bounded_singleton
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: refine' ⟨enum r (succ (typein r x)) (hr.2 _ (typein_lt_type r x)), _⟩
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x : α
⊢ Bounded r {x}

tactic: intro b hb
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x : α
⊢ ∀ (b : α), b ∈ {x} → r b (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))

tactic: rw [mem_singleton_iff.1 hb]
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x b : α
hb : b ∈ {x}
⊢ r b (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))

tactic: nth_rw 1 [← enum_typein r x]
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x b : α
hb : b ∈ {x}
⊢ r x (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))

tactic: rw [@enum_lt_enum _ r]
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x b : α
hb : b ∈ {x}
⊢ r (enum r (typein r x) (_ : typein r x < type r)) (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))

tactic: apply lt_succ
state_before: α : Type u_1
β : Type ?u.105149
γ : Type ?u.105152
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
hr : IsLimit (type r)
x b : α
hb : b ∈ {x}
⊢ typein r x < succ (typein r x)
Theorem: Stream'.inits_core_eq
File: Mathlib/Data/Stream/Init.lean

tactic: unfold initsCore corecOn
state_before: α : Type u
β : Type v
δ : Type w
l : List α
s : Stream' α
⊢ initsCore l s = l :: initsCore (l ++ [head s]) (tail s)

tactic: rw [corec_eq]
state_before: α : Type u
β : Type v
δ : Type w
l : List α
s : Stream' α
⊢ corec
      (fun x =>
        match x with
        | (a, snd) => a)
      (fun p =>
        match p with
        | (l', s') => (l' ++ [head s'], tail s'))
      (l, s) =
    l ::
      corec
        (fun x =>
          match x with
          | (a, snd) => a)
        (fun p =>
          match p with
          | (l', s') => (l' ++ [head s'], tail s'))
        (l ++ [head s], tail s)
Theorem: CategoryTheory.Functor.map_commSq
File: Mathlib/CategoryTheory/CommSq.lean

tactic: simpa using congr_arg (fun k : W ⟶ Z => F.map k) s.w
state_before: C : Type u_1
inst✝¹ : Category C
D : Type u_3
inst✝ : Category D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
s : CommSq f g h i
⊢ F.map f ≫ F.map h = F.map g ≫ F.map i
Theorem: not_squarefree_zero
File: Mathlib/Algebra/Squarefree.lean

tactic: erw [not_forall]
state_before: R : Type u_1
inst✝¹ : MonoidWithZero R
inst✝ : Nontrivial R
⊢ ¬Squarefree 0

tactic: exact ⟨0, by simp⟩
state_before: R : Type u_1
inst✝¹ : MonoidWithZero R
inst✝ : Nontrivial R
⊢ ∃ x, ¬(x * x ∣ 0 → IsUnit x)

tactic: simp
state_before: R : Type u_1
inst✝¹ : MonoidWithZero R
inst✝ : Nontrivial R
⊢ ¬(0 * 0 ∣ 0 → IsUnit 0)
Theorem: Polynomial.derivative_int_cast
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [← C_eq_int_cast n]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Ring R
n : ℤ
⊢ ↑derivative ↑n = 0

tactic: exact derivative_C
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Ring R
n : ℤ
⊢ ↑derivative (↑C ↑n) = 0
Theorem: toIocMod_add_left
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [add_comm, toIocMod_add_right]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocMod hp a (p + b) = toIocMod hp a b
Theorem: OmegaCompletePartialOrder.ContinuousHom.id_comp
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: ext
state_before: α : Type u
α' : Type ?u.65785
β : Type v
β' : Type ?u.65790
γ : Type u_1
φ : Type ?u.65796
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
f : β →𝒄 γ
⊢ comp id f = f

tactic: rfl
state_before: case h
α : Type u
α' : Type ?u.65785
β : Type v
β' : Type ?u.65790
γ : Type u_1
φ : Type ?u.65796
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β
inst✝³ : OmegaCompletePartialOrder γ
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
f : β →𝒄 γ
x✝ : β
⊢ ↑(comp id f).toOrderHom x✝ = ↑f.toOrderHom x✝
Theorem: gcd_pow_right_dvd_pow_gcd
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: by_cases hg : gcd a b = 0
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
k : ℕ
⊢ gcd a (b ^ k) ∣ gcd a b ^ k

tactic: rw [gcd_eq_zero_iff] at hg
state_before: case pos
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
k : ℕ
hg : gcd a b = 0
⊢ gcd a (b ^ k) ∣ gcd a b ^ k

tactic: rcases hg with ⟨rfl, rfl⟩
state_before: case pos
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
k : ℕ
hg : a = 0 ∧ b = 0
⊢ gcd a (b ^ k) ∣ gcd a b ^ k

tactic: exact
  (gcd_zero_left' (0 ^ k : α)).dvd.trans
    (pow_dvd_pow_of_dvd (gcd_zero_left' (0 : α)).symm.dvd _)
state_before: case pos.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
k : ℕ
⊢ gcd 0 (0 ^ k) ∣ gcd 0 0 ^ k

tactic: induction' k with k hk
state_before: case neg
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
k : ℕ
hg : ¬gcd a b = 0
⊢ gcd a (b ^ k) ∣ gcd a b ^ k

tactic: rw [pow_succ, pow_succ]
state_before: case neg.succ
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
k : ℕ
hk : gcd a (b ^ k) ∣ gcd a b ^ k
⊢ gcd a (b ^ Nat.succ k) ∣ gcd a b ^ Nat.succ k

tactic: trans gcd a b * gcd a (b ^ k)
state_before: case neg.succ
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
k : ℕ
hk : gcd a (b ^ k) ∣ gcd a b ^ k
⊢ gcd a (b * b ^ k) ∣ gcd a b * gcd a b ^ k

tactic: rw [pow_zero, pow_zero]
state_before: case neg.zero
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
⊢ gcd a (b ^ Nat.zero) ∣ gcd a b ^ Nat.zero

tactic: exact (gcd_one_right' a).dvd
state_before: case neg.zero
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
⊢ gcd a 1 ∣ 1

tactic: exact gcd_mul_dvd_mul_gcd a b (b ^ k)
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
k : ℕ
hk : gcd a (b ^ k) ∣ gcd a b ^ k
⊢ gcd a (b * b ^ k) ∣ gcd a b * gcd a (b ^ k)

tactic: exact (mul_dvd_mul_iff_left hg).mpr hk
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b : α
hg : ¬gcd a b = 0
k : ℕ
hk : gcd a (b ^ k) ∣ gcd a b ^ k
⊢ gcd a b * gcd a (b ^ k) ∣ gcd a b * gcd a b ^ k
Theorem: OrthonormalBasis.det_to_matrix_orthonormalBasis_of_opposite_orientation
File: Mathlib/Analysis/InnerProductSpace/Orientation.lean

tactic: contrapose! h
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
ι : Type u_2
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
ne : Nonempty ι
e f : OrthonormalBasis ι ℝ E
x : Orientation ℝ E ι
h : Basis.orientation (OrthonormalBasis.toBasis e) ≠ Basis.orientation (OrthonormalBasis.toBasis f)
⊢ ↑(Basis.det (OrthonormalBasis.toBasis e)) ↑f = -1

tactic: simp [e.toBasis.orientation_eq_iff_det_pos,
  (e.det_to_matrix_orthonormalBasis_real f).resolve_right h]
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
ι : Type u_2
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
ne : Nonempty ι
e f : OrthonormalBasis ι ℝ E
x : Orientation ℝ E ι
h : ↑(Basis.det (OrthonormalBasis.toBasis e)) ↑f ≠ -1
⊢ Basis.orientation (OrthonormalBasis.toBasis e) = Basis.orientation (OrthonormalBasis.toBasis f)
Theorem: continuousOn_piecewise_ite'
File: Mathlib/Topology/ContinuousOn.lean

tactic: apply ContinuousOn.piecewise
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.399126
δ : Type ?u.399129
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
s s' t : Set α
f f' : α → β
inst✝ : (x : α) → Decidable (x ∈ t)
h : ContinuousOn f (s ∩ closure t)
h' : ContinuousOn f' (s' ∩ closure (tᶜ))
H : s ∩ frontier t = s' ∩ frontier t
Heq : EqOn f f' (s ∩ frontier t)
⊢ ContinuousOn (piecewise t f f') (Set.ite t s s')

tactic: rwa [ite_inter_of_inter_eq _ H]
state_before: case ht
α : Type u_1
β : Type u_2
γ : Type ?u.399126
δ : Type ?u.399129
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
s s' t : Set α
f f' : α → β
inst✝ : (x : α) → Decidable (x ∈ t)
h : ContinuousOn f (s ∩ closure t)
h' : ContinuousOn f' (s' ∩ closure (tᶜ))
H : s ∩ frontier t = s' ∩ frontier t
Heq : EqOn f f' (s ∩ frontier t)
⊢ ∀ (a : α), a ∈ Set.ite t s s' ∩ frontier t → f a = f' a

tactic: rwa [ite_inter_closure_eq_of_inter_frontier_eq H]
state_before: case hf
α : Type u_1
β : Type u_2
γ : Type ?u.399126
δ : Type ?u.399129
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
s s' t : Set α
f f' : α → β
inst✝ : (x : α) → Decidable (x ∈ t)
h : ContinuousOn f (s ∩ closure t)
h' : ContinuousOn f' (s' ∩ closure (tᶜ))
H : s ∩ frontier t = s' ∩ frontier t
Heq : EqOn f f' (s ∩ frontier t)
⊢ ContinuousOn f (Set.ite t s s' ∩ closure t)

tactic: rwa [ite_inter_closure_compl_eq_of_inter_frontier_eq H]
state_before: case hg
α : Type u_1
β : Type u_2
γ : Type ?u.399126
δ : Type ?u.399129
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
s s' t : Set α
f f' : α → β
inst✝ : (x : α) → Decidable (x ∈ t)
h : ContinuousOn f (s ∩ closure t)
h' : ContinuousOn f' (s' ∩ closure (tᶜ))
H : s ∩ frontier t = s' ∩ frontier t
Heq : EqOn f f' (s ∩ frontier t)
⊢ ContinuousOn f' (Set.ite t s s' ∩ closure (tᶜ))
Theorem: MvPolynomial.aevalTower_ofId
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: ext
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝⁷ : CommSemiring R
inst✝⁶ : CommSemiring S₁
p q : MvPolynomial σ R
S : Type u_2
A : Type u_3
B : Type ?u.5318782
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : CommSemiring B
inst✝² : Algebra S R
inst✝¹ : Algebra S A
inst✝ : Algebra S B
g : R →ₐ[S] A
y : σ → A
⊢ aevalTower (Algebra.ofId S A) = aeval

tactic: simp only [aeval_X, aevalTower_X]
state_before: case h.hf
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝⁷ : CommSemiring R
inst✝⁶ : CommSemiring S₁
p q : MvPolynomial σ R
S : Type u_2
A : Type u_3
B : Type ?u.5318782
inst✝⁵ : CommSemiring S
inst✝⁴ : CommSemiring A
inst✝³ : CommSemiring B
inst✝² : Algebra S R
inst✝¹ : Algebra S A
inst✝ : Algebra S B
g : R →ₐ[S] A
y x✝ : σ → A
i✝ : σ
⊢ ↑(aevalTower (Algebra.ofId S A) x✝) (X i✝) = ↑(aeval x✝) (X i✝)
Theorem: InnerProductSpace.toDual_symm_apply
File: Mathlib/Analysis/InnerProductSpace/Dual.lean

tactic: rw [← toDual_apply]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : CompleteSpace E
x : E
y : NormedSpace.Dual 𝕜 E
⊢ inner (↑(LinearIsometryEquiv.symm (toDual 𝕜 E)) y) x = ↑y x

tactic: simp only [LinearIsometryEquiv.apply_symm_apply]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : CompleteSpace E
x : E
y : NormedSpace.Dual 𝕜 E
⊢ ↑(↑(toDual 𝕜 E) (↑(LinearIsometryEquiv.symm (toDual 𝕜 E)) y)) x = ↑y x
Theorem: List.get?_append_right
File: Std/Data/List/Lemmas.lean

tactic: rw [cons_append]
state_before: α : Type u_1
a : α
l x✝ : List α
n : Nat
h₁ : length (a :: l) ≤ n + 1
⊢ get? (a :: l ++ x✝) (n + 1) = get? x✝ (n + 1 - length (a :: l))

tactic: simp [get?_append_right (Nat.lt_succ.1 h₁)]
state_before: α : Type u_1
a : α
l x✝ : List α
n : Nat
h₁ : length (a :: l) ≤ n + 1
⊢ get? (a :: (l ++ x✝)) (n + 1) = get? x✝ (n + 1 - length (a :: l))