Skip to content

Commit

Permalink
fix(group_theory/group_action): generalize assumptions on ite_smul
Browse files Browse the repository at this point in the history
…and `smul_ite` (#9085)
  • Loading branch information
eric-wieser committed Sep 9, 2021
1 parent 3e10324 commit 9568977
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/group_theory/group_action/defs.lean
Expand Up @@ -192,6 +192,17 @@ by exact {smul_comm := λ _ n, @smul_comm _ _ _ _ _ _ _ (g n) }

end has_scalar

section ite
variables [has_scalar M α] (p : Prop) [decidable p]

@[to_additive] lemma ite_smul (a₁ a₂ : M) (b : α) : (ite p a₁ a₂) • b = ite p (a₁ • b) (a₂ • b) :=
by split_ifs; refl

@[to_additive] lemma smul_ite (a : M) (b₁ b₂ : α) : a • (ite p b₁ b₂) = ite p (a • b₁) (a • b₂) :=
by split_ifs; refl

end ite

section
variables [monoid M] [mul_action M α]

Expand Down Expand Up @@ -223,18 +234,6 @@ protected def function.surjective.mul_action [has_scalar M β] (f : α → β) (
one_smul := λ y, by { rcases hf y with ⟨x, rfl⟩, rw [← smul, one_smul] },
mul_smul := λ c₁ c₂ y, by { rcases hf y with ⟨x, rfl⟩, simp only [← smul, mul_smul] } }

section ite

variables (p : Prop) [decidable p]

@[to_additive] lemma ite_smul (a₁ a₂ : M) (b : α) : (ite p a₁ a₂) • b = ite p (a₁ • b) (a₂ • b) :=
by split_ifs; refl

@[to_additive] lemma smul_ite (a : M) (b₁ b₂ : α) : a • (ite p b₁ b₂) = ite p (a • b₁) (a • b₂) :=
by split_ifs; refl

end ite

section

variables (M)
Expand Down

0 comments on commit 9568977

Please sign in to comment.