Skip to content

Commit

Permalink
feat(field_theory/intermediate_field): generalize algebra instances
Browse files Browse the repository at this point in the history
The `algebra` and `is_scalar_tower` instances for `intermediate_field` are (again) as general as those for `subalgebra`.
  • Loading branch information
Vierkantor committed Aug 19, 2021
1 parent 902d3ac commit 4b525bf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/field_theory/intermediate_field.lean
Expand Up @@ -208,10 +208,16 @@ end
instance algebra : algebra K S :=
S.to_subalgebra.algebra

instance to_algebra : algebra S L :=
instance to_algebra {R : Type*} [semiring R] [algebra L R] : algebra S R :=
S.to_subalgebra.to_algebra

instance : is_scalar_tower K S L :=
instance is_scalar_tower_bot {R R' : Type*} [comm_semiring R] [semiring R']
[algebra L R] [algebra R R'] [algebra L R'] [is_scalar_tower L R R'] :
is_scalar_tower S L R' :=
is_scalar_tower.subalgebra _ _ _ S.to_subalgebra

instance is_scalar_tower_mid {R : Type*} [semiring R] [algebra L R] [algebra K R]
[is_scalar_tower K L R] : is_scalar_tower K S R :=
is_scalar_tower.subalgebra' _ _ _ S.to_subalgebra

variables {L' : Type*} [field L'] [algebra K L']
Expand Down

0 comments on commit 4b525bf

Please sign in to comment.