Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2020 Kenny Lau. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Kenny Lau | |
-/ | |
import data.polynomial.eval | |
import ring_theory.ideal.quotient | |
/-! | |
-/ | |
open submodule | |
open_locale polynomial | |
variables {R : Type*} [ring R] | |
variables {M : Type*} [add_comm_group M] [module R M] (U Uβ Uβ : submodule R M) | |
variables {x xβ xβ y yβ yβ z zβ zβ : M} | |
variables {N : Type*} [add_comm_group N] [module R N] (V Vβ Vβ : submodule R N) | |
/-- A predicate saying two elements of a module are equivalent modulo a submodule. -/ | |
def smodeq (x y : M) : Prop := | |
(submodule.quotient.mk x : M β§Έ U) = submodule.quotient.mk y | |
notation x ` β‘ `:50 y ` [SMOD `:50 N `]`:0 := smodeq N x y | |
variables {U Uβ Uβ} | |
protected lemma smodeq.def : x β‘ y [SMOD U] β | |
(submodule.quotient.mk x : M β§Έ U) = submodule.quotient.mk y := iff.rfl | |
namespace smodeq | |
lemma sub_mem : x β‘ y [SMOD U] β x - y β U := | |
by rw [smodeq.def, submodule.quotient.eq] | |
@[simp] theorem top : x β‘ y [SMOD (β€ : submodule R M)] := | |
(submodule.quotient.eq β€).2 mem_top | |
@[simp] theorem bot : x β‘ y [SMOD (β₯ : submodule R M)] β x = y := | |
by rw [smodeq.def, submodule.quotient.eq, mem_bot, sub_eq_zero] | |
@[mono] theorem mono (HU : Uβ β€ Uβ) (hxy : x β‘ y [SMOD Uβ]) : x β‘ y [SMOD Uβ] := | |
(submodule.quotient.eq Uβ).2 $ HU $ (submodule.quotient.eq Uβ).1 hxy | |
@[refl] theorem refl : x β‘ x [SMOD U] := eq.refl _ | |
@[symm] theorem symm (hxy : x β‘ y [SMOD U]) : y β‘ x [SMOD U] := hxy.symm | |
@[trans] theorem trans (hxy : x β‘ y [SMOD U]) (hyz : y β‘ z [SMOD U]) : x β‘ z [SMOD U] := | |
hxy.trans hyz | |
theorem add (hxyβ : xβ β‘ yβ [SMOD U]) (hxyβ : xβ β‘ yβ [SMOD U]) : xβ + xβ β‘ yβ + yβ [SMOD U] := | |
by { rw smodeq.def at hxyβ hxyβ β’, simp_rw [quotient.mk_add, hxyβ, hxyβ] } | |
theorem smul (hxy : x β‘ y [SMOD U]) (c : R) : c β’ x β‘ c β’ y [SMOD U] := | |
by { rw smodeq.def at hxy β’, simp_rw [quotient.mk_smul, hxy] } | |
theorem zero : x β‘ 0 [SMOD U] β x β U := | |
by rw [smodeq.def, submodule.quotient.eq, sub_zero] | |
theorem map (hxy : x β‘ y [SMOD U]) (f : M ββ[R] N) : f x β‘ f y [SMOD U.map f] := | |
(submodule.quotient.eq _).2 $ f.map_sub x y βΈ mem_map_of_mem $ (submodule.quotient.eq _).1 hxy | |
theorem comap {f : M ββ[R] N} (hxy : f x β‘ f y [SMOD V]) : x β‘ y [SMOD V.comap f] := | |
(submodule.quotient.eq _).2 $ show f (x - y) β V, | |
from (f.map_sub x y).symm βΈ (submodule.quotient.eq _).1 hxy | |
lemma eval {R : Type*} [comm_ring R] {I : ideal R} {x y : R} (h : x β‘ y [SMOD I]) | |
(f : R[X]) : f.eval x β‘ f.eval y [SMOD I] := | |
begin | |
rw [smodeq.def] at h β’, | |
show ideal.quotient.mk I (f.eval x) = ideal.quotient.mk I (f.eval y), | |
change ideal.quotient.mk I x = ideal.quotient.mk I y at h, | |
rw [β polynomial.evalβ_at_apply, β polynomial.evalβ_at_apply, h], | |
end | |
end smodeq | |