Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored and added proofs of QR decomposition and Schur decomposition #41

Merged
merged 9 commits into from
Mar 22, 2024
573 changes: 573 additions & 0 deletions CauchySchwarz.v

Large diffs are not rendered by default.

27 changes: 24 additions & 3 deletions Complex.v
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ Proof. intros.
rewrite <- H' in H2. easy.
Qed.


Lemma Cinv_mult_distr : forall c1 c2 : C, c1 <> 0 -> c2 <> 0 -> / (c1 * c2) = / c1 * / c2.
Proof.
intros.
Expand Down Expand Up @@ -673,7 +672,17 @@ Proof. intros.
apply nonzero_div_nonzero; auto.
Qed.


Lemma Cconj_eq_implies_real : forall c : C, c = Cconj c -> snd c = 0%R.
Proof. intros.
unfold Cconj in H.
apply (f_equal snd) in H.
simpl in H.
assert (H' : (2 * snd c = 0)%R).
replace (2 * snd c)%R with (snd c + (- snd c))%R by lra.
lra.
replace (snd c) with (/2 * (2 * snd c))%R by lra.
rewrite H'; lra.
Qed.

(** * some C big_sum specific lemmas *)

Expand Down Expand Up @@ -987,7 +996,19 @@ Lemma Cconj_involutive : forall c, (c^*)^* = c. Proof. intros; lca. Qed.
Lemma Cconj_plus_distr : forall (x y : C), (x + y)^* = x^* + y^*. Proof. intros; lca. Qed.
Lemma Cconj_mult_distr : forall (x y : C), (x * y)^* = x^* * y^*. Proof. intros; lca. Qed.
Lemma Cconj_minus_distr : forall (x y : C), (x - y)^* = x^* - y^*. Proof. intros; lca. Qed.


Lemma Cinv_Cconj : forall c : C, (/ (c ^*) = (/ c) ^*)%C.
Proof. intros.
unfold Cinv, Cconj; simpl.
apply c_proj_eq; simpl; try lra.
apply f_equal. lra.
(* this is just Ropp_div or Ropp_div_l, depending on Coq version *)
assert (H' : forall x y : R, (- x / y)%R = (- (x / y))%R).
{ intros. lra. }
rewrite <- H'.
apply f_equal. lra.
Qed.

Lemma Cmult_conj_real : forall (c : C), snd (c * c^*) = 0.
Proof.
intros c.
Expand Down
Loading
Loading