23 lines
415 B
Coq
23 lines
415 B
Coq
From mathcomp Require Import all_ssreflect all_algebra.
|
|
|
|
(* Inductive point: Type := *)
|
|
(* | Point (x y z: nat). *)
|
|
|
|
(* Definition getX (p: point): nat := *)
|
|
(* let: Point x _ _ := p in x. *)
|
|
(* Compute getX (Point 1 2 3). *)
|
|
(* (1* = 1 : nat *1) *)
|
|
|
|
Print matrix.
|
|
|
|
Variant point: Type :=
|
|
| Point (x y z: nat).
|
|
|
|
Compute 3.+1.
|
|
(* = 4 : nat *)
|
|
|
|
Check point_rect.
|
|
Check point_ind.
|
|
Check point_rec.
|
|
Check point_sind.
|