File: PrimitiveProjections.v

package info (click to toggle)
coq-dpdgraph 1.0%2B8.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 604 kB
  • sloc: ml: 686; makefile: 212
file content (17 lines) | stat: -rw-r--r-- 498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Set Primitive Projections.
Set Implicit Arguments.

Record sigT {A} (P : A -> Type) := existT { projT1 : A ; projT2 : P projT1 }.

Notation "{ x : A  & P }" := (sigT (A:=A) (fun x => P)) : type_scope.

Definition bar := @projT1.
Definition baz A P (x : @sigT A P) := projT1 x.

Definition foo (A: Type) (B: A -> Type) (C: A -> Type) (c: {x : A & {_ : B x & C x}}) : {x : A & {_ : C x & B x}}.
Proof.
  exists (projT1 c).
  exists (projT2 (projT2 c)).
  destruct c as [a [b c]].
  exact b.
Defined.