Require Export Reals Coquelicot.Coquelicot.
AbelianGroup-compatibility
Section AboutCompatibleG.
Context {
E :
AbelianGroup}.
Definition compatible_g (
P:
E ->
Prop) :
Prop :=
(
forall (
x y:
E),
P x ->
P y ->
P (
plus x (
opp y))) /\
(
exists (
x:
E),
P x).
Lemma compatible_g_zero:
forall P,
compatible_g P ->
P zero.
Proof.
intros P HP;
destruct HP as (
H1,(
e,
He)).
specialize (
H1 e e).
rewrite plus_opp_r in H1.
now apply H1.
Qed.
Lemma compatible_g_opp:
forall P x,
compatible_g P
->
P x ->
P (
opp x).
Proof.
Lemma compatible_g_plus:
forall P x y,
compatible_g P
->
P x ->
P y ->
P (
plus x y).
Proof.
End AboutCompatibleG.
ModuleSpace-compatibility
Section AboutCompatibleM.
Context {
E :
ModuleSpace R_Ring}.
Definition compatible_m (
phi:
E->
Prop):=
compatible_g phi /\
(
forall (
x:
E) (
l:
R),
phi x ->
phi (
scal l x)).
Lemma compatible_m_zero:
forall P,
compatible_m P ->
P zero.
Proof.
Lemma compatible_m_plus:
forall P x y,
compatible_m P
->
P x ->
P y ->
P (
plus x y).
Proof.
Lemma compatible_m_scal:
forall P a y,
compatible_m P
->
P y ->
P (
scal a y).
Proof.
intros P x y HP Hy.
apply HP; trivial.
Qed.
Lemma compatible_m_opp:
forall P x,
compatible_m P
->
P x ->
P (
opp x).
Proof.
End AboutCompatibleM.
Sums and direct sums
Section Compat_m.
Context {
E :
ModuleSpace R_Ring}.
Variable phi:
E->
Prop.
Variable phi':
E->
Prop.
Definition m_plus (
phi phi':
E ->
Prop)
:= (
fun (
x:
E) =>
exists u u',
phi u ->
phi'
u' ->
x=
plus u u').
Hypothesis Cphi:
compatible_m phi.
Hypothesis Cphi':
compatible_m phi'.
Lemma compatible_m_plus2:
compatible_m (
m_plus phi phi').
unfold compatible_m in *;
unfold compatible_g in *.
destruct Cphi as ((
Cphi1,(
a,
Cphi2)),
Cphi3).
destruct Cphi'
as ((
Cphi1',(
a',
Cphi2')),
Cphi3').
unfold m_plus in *.
split.
split;
intros.
exists (
plus x (
opp y)).
exists zero.
intros.
rewrite plus_zero_r.
reflexivity.
exists (
plus a a').
exists a.
exists a'.
intros.
reflexivity.
intros.
exists (
scal l x).
exists (
scal zero x).
intros.
rewrite <-
scal_distr_r.
rewrite plus_zero_r.
reflexivity.
Qed.