@@ -244,6 +244,7 @@ Definition ltc (x y : R[i]) :=
244
244
let : a +i* b := x in let : c +i* d := y in
245
245
(d == b) && (a < c).
246
246
247
+ (* TODO: when Pythagorean Fields are added, weaken to Pythagorean Field *)
247
248
Definition normc (x : R[i]) : R :=
248
249
let : a +i* b := x in sqrtr (a ^+ 2 + b ^+ 2).
249
250
@@ -327,24 +328,27 @@ Definition complex_numMixin := NumMixin lec_normD ltc0_add eq0_normC
327
328
ge0_lec_total normCM lec_def ltc_def.
328
329
Canonical complex_porderType := POrderType ring_display R[i] complex_numMixin.
329
330
Canonical complex_numDomainType := NumDomainType R[i] complex_numMixin.
331
+ Canonical complex_numFieldType := [numFieldType of R[i]].
330
332
Canonical complex_normedZmodType :=
331
333
NormedZmodType R[i] R[i] complex_numMixin.
332
334
333
335
End ComplexField.
334
336
End ComplexField.
335
337
336
338
Canonical ComplexField.complex_zmodType.
337
- Canonical ComplexField.complex_lmodType.
339
+ (* we do not export the canonical structure of lmodType on purpose *)
340
+ (* i.e. no: Canonical ComplexField.complex_lmodType. *)
341
+ (* indeed, this would prevent C fril having a normed module over C *)
338
342
Canonical ComplexField.complex_ringType.
339
343
Canonical ComplexField.complex_comRingType.
340
344
Canonical ComplexField.complex_unitRingType.
341
345
Canonical ComplexField.complex_comUnitRingType.
342
346
Canonical ComplexField.complex_idomainType.
343
347
Canonical ComplexField.complex_fieldType.
344
348
Canonical ComplexField.complex_porderType.
345
- Canonical ComplexField.complex_numDomainType.
346
349
Canonical ComplexField.complex_normedZmodType.
347
- Canonical complex_numFieldType (R : rcfType) := [numFieldType of complex R].
350
+ Canonical ComplexField.complex_numDomainType.
351
+ Canonical ComplexField.complex_numFieldType.
348
352
Canonical ComplexField.real_complex_rmorphism.
349
353
Canonical ComplexField.real_complex_additive.
350
354
Canonical ComplexField.Re_additive.
@@ -373,49 +377,46 @@ Ltac simpc := do ?
373
377
Section ComplexTheory.
374
378
375
379
Variable R : rcfType.
380
+ Implicit Types (k : R) (x y z : R[i]).
376
381
377
- Lemma ReiNIm : forall x : R[i] , Re (x * 'i%C) = - Im x.
382
+ Lemma ReiNIm : forall x, Re (x * 'i%C) = - Im x.
378
383
Proof . by case=> a b; simpc. Qed .
379
384
380
- Lemma ImiRe : forall x : R[i] , Im (x * 'i%C) = Re x.
385
+ Lemma ImiRe : forall x, Im (x * 'i%C) = Re x.
381
386
Proof . by case=> a b; simpc. Qed .
382
387
383
388
Lemma complexE x : x = (Re x)%:C + 'i%C * (Im x)%:C :> R[i].
384
389
Proof . by case: x => *; simpc. Qed .
385
390
386
- Lemma real_complexE x : x %:C = x +i* 0 :> R[i]. Proof . done. Qed .
391
+ Lemma real_complexE k : k %:C = k +i* 0 :> R[i]. Proof . done. Qed .
387
392
388
393
Lemma sqr_i : 'i%C ^+ 2 = -1 :> R[i].
389
394
Proof . by rewrite exprS; simpc; rewrite -real_complexE rmorphN. Qed .
390
395
391
396
Lemma complexI : injective (real_complex R). Proof . by move=> x y []. Qed .
392
397
393
- Lemma ler0c (x : R) : (0 <= x %:C) = (0 <= x ). Proof . by simpc. Qed .
398
+ Lemma ler0c k : (0 <= k %:C) = (0 <= k ). Proof . by simpc. Qed .
394
399
395
- Lemma lecE : forall x y : R[i] , (x <= y) = (Im y == Im x) && (Re x <= Re y).
400
+ Lemma lecE : forall x y, (x <= y) = (Im y == Im x) && (Re x <= Re y).
396
401
Proof . by move=> [a b] [c d]. Qed .
397
402
398
- Lemma ltcE : forall x y : R[i] , (x < y) = (Im y == Im x) && (Re x < Re y).
403
+ Lemma ltcE : forall x y, (x < y) = (Im y == Im x) && (Re x < Re y).
399
404
Proof . by move=> [a b] [c d]. Qed .
400
405
401
- Lemma lecR : forall x y : R , (x %:C <= y %:C) = (x <= y ).
402
- Proof . by move=> x y ; simpc. Qed .
406
+ Lemma lecR : forall k k' , (k %:C <= k' %:C) = (k <= k' ).
407
+ Proof . by move=> k k' ; simpc. Qed .
403
408
404
- Lemma ltcR : forall x y : R , (x %:C < y %:C) = (x < y ).
405
- Proof . by move=> x y ; simpc. Qed .
409
+ Lemma ltcR : forall k k' , (k %:C < k' %:C) = (k < k' ).
410
+ Proof . by move=> k k' ; simpc. Qed .
406
411
407
412
Lemma conjc_is_rmorphism : rmorphism (@conjc R).
408
413
Proof .
409
414
split=> [[a b] [c d]|] /=; first by simpc; rewrite [d - _]addrC.
410
415
by split=> [[a b] [c d]|] /=; simpc.
411
416
Qed .
412
417
413
- Lemma conjc_is_scalable : scalable (@conjc R).
414
- Proof . by move=> a [b c]; simpc. Qed .
415
-
416
418
Canonical conjc_rmorphism := RMorphism conjc_is_rmorphism.
417
419
Canonical conjc_additive := Additive conjc_is_rmorphism.
418
- Canonical conjc_linear := AddLinear conjc_is_scalable.
419
420
420
421
Lemma conjcK : involutive (@conjc R).
421
422
Proof . by move=> [a b] /=; rewrite opprK. Qed .
@@ -448,7 +449,7 @@ Proof. by move: x=> [a b] /=; simpc => /andP [/eqP]. Qed.
448
449
(* Todo : extend theory of : *)
449
450
(* - signed exponents *)
450
451
451
- Lemma conj_ge0 : forall x : R[i] , (0 <= x ^*) = (0 <= x).
452
+ Lemma conj_ge0 : forall x, (0 <= x ^*) = (0 <= x).
452
453
Proof . by move=> [a b] /=; simpc; rewrite oppr_eq0. Qed .
453
454
454
455
Lemma conjc_nat : forall n, (n%:R : R[i])^* = n%:R.
@@ -460,10 +461,10 @@ Proof. exact: (conjc_nat 0). Qed.
460
461
Lemma conjc1 : (1 : R[i]) ^* = 1.
461
462
Proof . exact: (conjc_nat 1). Qed .
462
463
463
- Lemma conjc_eq0 : forall x : R[i] , (x ^* == 0) = (x == 0).
464
+ Lemma conjc_eq0 : forall x, (x ^* == 0) = (x == 0).
464
465
Proof . by move=> [a b]; rewrite !eq_complex /= eqr_oppLR oppr0. Qed .
465
466
466
- Lemma conjc_inv: forall x : R[i] , (x^-1)^* = (x^*%C )^-1.
467
+ Lemma conjc_inv: forall x, (x^-1)^* = (x^*%C )^-1.
467
468
Proof . exact: fmorphV. Qed .
468
469
469
470
Lemma complex_root_conj (p : {poly R[i]}) (x : R[i]) :
@@ -474,7 +475,7 @@ Lemma complex_algebraic_trans (T : comRingType) (toR : {rmorphism T -> R}) :
474
475
integralRange toR -> integralRange (real_complex R \o toR).
475
476
Proof .
476
477
set f := _ \o _ => R_integral [a b].
477
- have integral_real x : integralOver f (x %:C) by apply: integral_rmorph.
478
+ have integral_real k : integralOver f (k %:C) by apply: integral_rmorph.
478
479
rewrite [_ +i* _]complexE.
479
480
apply: integral_add => //; apply: integral_mul => //=.
480
481
exists ('X^2 + 1).
@@ -503,20 +504,48 @@ rewrite realE; simpc; rewrite [0 == _]eq_sym.
503
504
by have [] := ltrgtP 0 a; rewrite ?(andbF, andbT, orbF, orbb).
504
505
Qed .
505
506
506
- Lemma complex_realP ( x : R[i]) : reflect (exists y , x = y %:C) (x \is Num.real).
507
+ Lemma complex_realP x : reflect (exists k , x = k %:C) (x \is Num.real).
507
508
Proof .
508
509
case: x=> [a b] /=; rewrite complex_real.
509
510
by apply: (iffP eqP) => [->|[c []//]]; exists a.
510
511
Qed .
511
512
512
- Lemma RRe_real (x : R[i]) : x \is Num.real -> (Re x)%:C = x.
513
+ Lemma RRe_real x : x \is Num.real -> (Re x)%:C = x.
513
514
Proof . by move=> /complex_realP [y ->]. Qed .
514
515
515
- Lemma RIm_real (x : R[i]) : x \is Num.real -> (Im x)%:C = 0.
516
+ Lemma RIm_real x : x \is Num.real -> (Im x)%:C = 0.
516
517
Proof . by move=> /complex_realP [y ->]. Qed .
517
518
518
519
End ComplexTheory.
519
520
521
+ Definition Rcomplex := complex.
522
+ Canonical Rcomplex_eqType (R : eqType) := [eqType of Rcomplex R].
523
+ Canonical Rcomplex_countType (R : countType) := [countType of Rcomplex R].
524
+ Canonical Rcomplex_choiceType (R : choiceType) := [choiceType of Rcomplex R].
525
+ Canonical Rcomplex_zmodType (R : rcfType) := [zmodType of Rcomplex R].
526
+ Canonical Rcomplex_ringType (R : rcfType) := [ringType of Rcomplex R].
527
+ Canonical Rcomplex_comRingType (R : rcfType) := [comRingType of Rcomplex R].
528
+ Canonical Rcomplex_unitRingType (R : rcfType) := [unitRingType of Rcomplex R].
529
+ Canonical Rcomplex_comUnitRingType (R : rcfType) := [comUnitRingType of Rcomplex R].
530
+ Canonical Rcomplex_idomainType (R : rcfType) := [idomainType of Rcomplex R].
531
+ Canonical Rcomplex_fieldType (R : rcfType) := [fieldType of Rcomplex R].
532
+ Canonical Rcomplex_lmodType (R : rcfType) :=
533
+ LmodType R (Rcomplex R) (ComplexField.complex_lmodMixin R).
534
+
535
+ Module RComplexLMod.
536
+ Section RComplexLMod.
537
+ Variable R : rcfType.
538
+ Implicit Types (k : R) (x y z : Rcomplex R).
539
+ Canonical ComplexField.complex_lmodType.
540
+
541
+ Lemma conjc_is_scalable : scalable (conjc : Rcomplex R -> Rcomplex R).
542
+ Proof . by move=> a [b c]; simpc. Qed .
543
+ Canonical conjc_linear := AddLinear conjc_is_scalable.
544
+
545
+ End RComplexLMod.
546
+ End RComplexLMod.
547
+ Canonical RComplexLMod.conjc_linear.
548
+
520
549
(* Section RcfDef. *)
521
550
522
551
(* Variable R : realFieldType. *)
@@ -1182,33 +1211,6 @@ End Paper_HarmDerksen.
1182
1211
1183
1212
End ComplexClosed.
1184
1213
1185
- (* End ComplexInternal. *)
1186
-
1187
- (* Canonical ComplexInternal.complex_eqType. *)
1188
- (* Canonical ComplexInternal.complex_choiceType. *)
1189
- (* Canonical ComplexInternal.complex_countType. *)
1190
- (* Canonical ComplexInternal.complex_ZmodType. *)
1191
- (* Canonical ComplexInternal.complex_Ring. *)
1192
- (* Canonical ComplexInternal.complex_comRing. *)
1193
- (* Canonical ComplexInternal.complex_unitRing. *)
1194
- (* Canonical ComplexInternal.complex_comUnitRing. *)
1195
- (* Canonical ComplexInternal.complex_iDomain. *)
1196
- (* Canonical ComplexInternal.complex_fieldType. *)
1197
- (* Canonical ComplexInternal.ComplexField.real_complex_rmorphism. *)
1198
- (* Canonical ComplexInternal.ComplexField.real_complex_additive. *)
1199
- (* Canonical ComplexInternal.ComplexField.Re_additive. *)
1200
- (* Canonical ComplexInternal.ComplexField.Im_additive. *)
1201
- (* Canonical ComplexInternal.complex_numDomainType. *)
1202
- (* Canonical ComplexInternal.complex_normedZmodType. *)
1203
- (* Canonical ComplexInternal.complex_numFieldType. *)
1204
- (* Canonical ComplexInternal.conjc_rmorphism. *)
1205
- (* Canonical ComplexInternal.conjc_additive. *)
1206
- (* Canonical ComplexInternal.complex_decField. *)
1207
- (* Canonical ComplexInternal.complex_closedField. *)
1208
- (* Canonical ComplexInternal.complex_numClosedFieldType. *)
1209
-
1210
- (* Definition complex_algebraic_trans := ComplexInternal.complex_algebraic_trans. *)
1211
-
1212
1214
Section ComplexClosedTheory.
1213
1215
1214
1216
Variable R : rcfType.
0 commit comments