Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import HoTT.Spaces.No.Core.LocalOpen Scope path_scope.LocalOpen Scope surreal_scope.(** * Negation of surreal numbers *)(** Negation requires the option sorts to be symmetric. *)ClassHasNegation (S : OptionSort)
:= symmetric_options :: forallLR, InSort S L R -> InSort S R L.Instancehasnegation_maxsort : HasNegation MaxSort
:= fun___ => tt.
HasNegation DecSort
HasNegation DecSort
intros L R [? ?]; split; assumption.Qed.SectionHasNegation.Universei.Context {S : OptionSort@{i}} `{HasNegation S}.LetNo := GenNo S.
S: OptionSort H: HasNegation S No:= GenNo S: Type
No -> No
S: OptionSort H: HasNegation S No:= GenNo S: Type
No -> No
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r)
No
S: OptionSort H: HasNegation S No:= GenNo S: Type a, b: No X: (funxy : No => y <= x) a b X0: (funxy : No => y <= x) b a
a = b
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) p: foralll : L, xL l < {{ yL | yR//ycut }} dp: foralll : L,
(funxy : No => y < x) (fxL l)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l0 : L)
(r : R), xL l0 < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l0 : L)
(r : R),
(funxy : No => y < x)
(fxL l0)
(fxR r)) =>
?Goal) L' R' s' yL yR ycut fyL fyR fycut) q: forallr : R', {{ xL | xR//xcut }} < yR r dq: forallr : R',
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L)
(r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r0 : R),
(funxy : No => y < x)
(fxL l)
(fxR r0)) =>
?Goal) L R s xL xR xcut fxL fxR fxcut)
(fyR r)
(funxy : No => y <= x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) l: L' p: {{ xL | xR//xcut }} <= yL l dp: (funxy : No => y <= x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x)
(fxL l)
(fxR r)) =>
?Goal) L R s xL xR xcut fxL fxR fxcut)
(fyL l)
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) r: R p: xR r <= {{ yL | yR//ycut }} dp: (funxy : No => y <= x)
(fxR r)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x)
(fxL l)
(fxR r)) =>
?Goal) L' R' s' yL yR ycut fyL fyR fycut)
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=> ?Goal) L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r)
No
exact {{ fxR | fxL // funrl => fxcut l r }}.
S: OptionSort H: HasNegation S No:= GenNo S: Type a, b: No X: (funxy : No => y <= x) a b X0: (funxy : No => y <= x) b a
a = b
apply path_No; assumption.
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) p: foralll : L, xL l < {{ yL | yR//ycut }} dp: foralll : L,
(funxy : No => y < x) (fxL l)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l0 : L) (r : R), xL l0 < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l0 : L)
(r : R),
(funxy : No => y < x)
(fxL l0)
(fxR r)) =>
{{ fxR | fxL//fun (r : R) (l0 : L) =>
fxcut l0 r }}) L' R' s' yL yR
ycut fyL fyR fycut) q: forallr : R', {{ xL | xR//xcut }} < yR r dq: forallr : R',
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l : L) (r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r0 : R),
(funxy : No => y < x)
(fxL l)
(fxR r0)) =>
{{ fxR | fxL//fun (r0 : R) (l : L) =>
fxcut l r0 }}) L R s xL xR xcut
fxL fxR fxcut) (fyR r)
(funxy : No => y <= x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R), fxR r < fxL l L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'), fyR r < fyL l p: foralll : L, xL l < {{ yL | yR//ycut }} dp: foralll : L,
{{ fyR | fyL//fun (r : R') (l0 : L') =>
fycut l0 r }} <
fxL l q: forallr : R', {{ xL | xR//xcut }} < yR r dq: forallr : R',
fyR r <
{{ fxR | fxL//fun (r0 : R) (l : L) => fxcut l r0 }}
{{ fyR | fyL//fun (r : R') (l : L') => fycut l r }} <=
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }}
apply le_lr; intros; [ apply dq | apply dp ].
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) l: L' p: {{ xL | xR//xcut }} <= yL l dp: (funxy : No => y <= x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x)
(fxL l)
(fxR r)) =>
{{ fxR | fxL//fun (r : R) (l : L) =>
fxcut l r }}) L R s xL xR xcut
fxL fxR fxcut) (fyL l)
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R), fxR r < fxL l L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'), fyR r < fyL l l: L' p: {{ xL | xR//xcut }} <= yL l dp: fyL l <=
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }}
{{ fyR | fyL//fun (r : R') (l : L') => fycut l r }} <
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }}
apply lt_r with l; intros; assumption.
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r) L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'),
(funxy : No => y < x) (fyL l) (fyR r) r: R p: xR r <= {{ yL | yR//ycut }} dp: (funxy : No => y <= x)
(fxR r)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L)
(r : R),
(funxy : No => y < x)
(fxL l)
(fxR r)) =>
{{ fxR | fxL//fun (r : R) (l : L) =>
fxcut l r }}) L' R' s' yL yR
ycut fyL fyR fycut)
(funxy : No => y < x)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L R s xL xR xcut fxL fxR fxcut)
((fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r : R), xL l < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r : R),
(funxy : No => y < x) (fxL l) (fxR r))
=>
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }})
L' R' s' yL yR ycut fyL fyR fycut)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type s: InSort S L R xL: L -> GenNo S xR: R -> GenNo S xcut: forall (l : L) (r : R), xL l < xR r fxL: L -> No fxR: R -> No fxcut: forall (l : L) (r : R), fxR r < fxL l L', R': Type s': InSort S L' R' yL: L' -> GenNo S yR: R' -> GenNo S ycut: forall (l : L') (r : R'), yL l < yR r fyL: L' -> No fyR: R' -> No fycut: forall (l : L') (r : R'), fyR r < fyL l r: R p: xR r <= {{ yL | yR//ycut }} dp: {{ fyR | fyL//fun (r : R') (l : L') => fycut l r }} <=
fxR r
{{ fyR | fyL//fun (r : R') (l : L') => fycut l r }} <
{{ fxR | fxL//fun (r : R) (l : L) => fxcut l r }}
apply lt_l with r; intros; assumption.Defined.(** More useful is the following rewriting lemma. *)
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type Sx: InSort S L R xL: L -> No xR: R -> No xcut: forall (l : L) (r : R), xL l < xR r
S: OptionSort H: HasNegation S No:= GenNo S: Type L, R: Type Sx: InSort S L R xL: L -> No xR: R -> No xcut: forall (l : L) (r : R), xL l < xR r
{{ funr : R =>
No_rec No (funxy : No => y <= x)
(funxy : No => y < x)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r0 : R),
fxR r0 < fxL l) =>
{{ fxR | fxL//fun (r0 : R) (l : L) => fxcut l r0 }})
(fun (ab : No) (H : b <= a) (H0 : a <= b) =>
path_No a b H0 H)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(xcut : forall (l : L) (r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r0 : R),
fxR r0 < fxL l) (L'R' : Type)
(s' : InSort S L' R') (yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(ycut : forall (l : L') (r0 : R'),
yL l < yR r0) (fyL : L' -> No)
(fyR : R' -> No)
(fycut : forall (l : L') (r0 : R'),
fyR r0 < fyL l)
(_ : foralll : L, xL l < {{ yL | yR//ycut }})
(dp : foralll : L,
{{ fyR | fyL//fun (r0 : R') (l0 : L') =>
fycut l0 r0 }} < fxL l)
(_ : forallr0 : R',
{{ xL | xR//xcut }} < yR r0)
(dq : forallr0 : R',
fyR r0 <
{{ fxR | fxL//fun (r1 : R) (l : L) =>
fxcut l r1 }}) =>
le_lr fyR fyL
(fun (r0 : R') (l : L') => fycut l r0) fxR fxL
(fun (r0 : R) (l : L) => fxcut l r0)
(funl : R' => dq l) (funr0 : L => dp r0))
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(xcut : forall (l : L) (r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r0 : R),
fxR r0 < fxL l) (L'R' : Type)
(s' : InSort S L' R') (yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(_ : forall (l : L') (r0 : R'), yL l < yR r0)
(fyL : L' -> No) (fyR : R' -> No)
(fycut : forall (l : L') (r0 : R'),
fyR r0 < fyL l) (l : L')
(_ : {{ xL | xR//xcut }} <= yL l)
(dp : fyL l <=
{{ fxR | fxL//fun (r0 : R) (l0 : L) =>
fxcut l0 r0 }}) =>
lt_r fyR fyL
(fun (r0 : R') (l0 : L') => fycut l0 r0) fxR
fxL (fun (r0 : R) (l0 : L) => fxcut l0 r0) l
dp)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S) (xR : R -> GenNo S)
(_ : forall (l : L) (r0 : R), xL l < xR r0)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l : L) (r0 : R),
fxR r0 < fxL l) (L'R' : Type)
(s' : InSort S L' R') (yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(ycut : forall (l : L') (r0 : R'),
yL l < yR r0) (fyL : L' -> No)
(fyR : R' -> No)
(fycut : forall (l : L') (r0 : R'),
fyR r0 < fyL l) (r0 : R)
(_ : xR r0 <= {{ yL | yR//ycut }})
(dp : {{ fyR | fyL//fun (r1 : R') (l : L') =>
fycut l r1 }} <= fxR r0)
=>
lt_l fyR fyL
(fun (r1 : R') (l : L') => fycut l r1) fxR fxL
(fun (r1 : R) (l : L) => fxcut l r1) r0 dp)
(xR r) | (funl : L =>
No_rec No (funxy : No => y <= x)
(funxy : No => y < x)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l0 : L) (r : R),
xL l0 < xR r) (fxL : L -> No)
(fxR : R -> No)
(fxcut : forall (l0 : L) (r : R),
fxR r < fxL l0) =>
{{ fxR | fxL//fun (r : R) (l0 : L)
=> fxcut l0 r }})
(fun (ab : No) (H : b <= a)
(H0 : a <= b) => path_No a b H0 H)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l0 : L) (r : R),
xL l0 < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l0 : L) (r : R),
fxR r < fxL l0)
(L'R' : Type)
(s' : InSort S L' R')
(yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(ycut : forall (l0 : L') (r : R'),
yL l0 < yR r)
(fyL : L' -> No) (fyR : R' -> No)
(fycut : forall (l0 : L')
(r : R'), fyR r < fyL l0)
(_ : foralll0 : L,
xL l0 < {{ yL | yR//ycut }})
(dp : foralll0 : L,
{{ fyR | fyL//fun (r : R')
(l1 : L') =>
fycut l1 r }} <
fxL l0)
(_ : forallr : R',
{{ xL | xR//xcut }} < yR r)
(dq : forallr : R',
fyR r <
{{ fxR | fxL//fun (r0 : R)
(l0 : L) =>
fxcut l0 r0 }})
=>
le_lr fyR fyL
(fun (r : R') (l0 : L') =>
fycut l0 r) fxR fxL
(fun (r : R) (l0 : L) =>
fxcut l0 r)
(funl0 : R' => dq l0)
(funr : L => dp r))
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(xcut : forall (l0 : L) (r : R),
xL l0 < xR r)
(fxL : L -> No) (fxR : R -> No)
(fxcut : forall (l0 : L) (r : R),
fxR r < fxL l0)
(L'R' : Type)
(s' : InSort S L' R')
(yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(_ : forall (l0 : L') (r : R'),
yL l0 < yR r)
(fyL : L' -> No) (fyR : R' -> No)
(fycut : forall (l0 : L')
(r : R'), fyR r < fyL l0)
(l0 : L')
(_ : {{ xL | xR//xcut }} <= yL l0)
(dp : fyL l0 <=
{{ fxR | fxL//fun (r : R)
(l1 : L) =>
fxcut l1 r }})
=>
lt_r fyR fyL
(fun (r : R') (l1 : L') =>
fycut l1 r) fxR fxL
(fun (r : R) (l1 : L) =>
fxcut l1 r) l0 dp)
(fun (LR : Type) (s : InSort S L R)
(xL : L -> GenNo S)
(xR : R -> GenNo S)
(_ : forall (l0 : L) (r : R),
xL l0 < xR r) (fxL : L -> No)
(fxR : R -> No)
(fxcut : forall (l0 : L) (r : R),
fxR r < fxL l0)
(L'R' : Type)
(s' : InSort S L' R')
(yL : L' -> GenNo S)
(yR : R' -> GenNo S)
(ycut : forall (l0 : L') (r : R'),
yL l0 < yR r)
(fyL : L' -> No) (fyR : R' -> No)
(fycut : forall (l0 : L')
(r : R'), fyR r < fyL l0)
(r : R)
(_ : xR r <= {{ yL | yR//ycut }})
(dp : {{ fyR | fyL//fun (r0 : R')
(l0 : L') =>
fycut l0 r0 }} <=
fxR r) =>
lt_l fyR fyL
(fun (r0 : R') (l0 : L') =>
fycut l0 r0) fxR fxL
(fun (r0 : R) (l0 : L) =>
fxcut l0 r0) r dp) (xL l))//fun
(r : R)
(l : L)
=>
No_rec_lt
No
(funxy : No
=>
y <=
x)
(funxy : No
=>
y < x)
(fun
(LR : Type)
(s :
InSort
S L R)
(xL :
L ->
GenNo
S)
(xR :
R ->
GenNo
S)
(_ :
forall
(l0 : L)
(r0 : R),
xL l0 <
xR r0)
(fxL :
L ->
No)
(fxR :
R ->
No)
(fxcut :
forall
(l0 : L)
(r0 : R),
fxR
r0 <
fxL
l0)
=>
{{ fxR | fxL//
fun
(r0 : R)
(l0 : L)
=>
fxcut
l0 r0 }})
(fun
(ab : No)
(H :
b <=
a)
(H0 :
a <=
b) =>
path_No
a b
H0 H)
(fun
(LR : Type)
(s :
InSort
S L R)
(xL :
L ->
GenNo
S)
(xR :
R ->
GenNo
S)
(xcut :
forall
(l0 : L)
(r0 : R),
xL l0 <
xR r0)
(fxL :
L ->
No)
(fxR :
R ->
No)
(fxcut :
forall
(l0 : L)
(r0 : R),
fxR
r0 <
fxL
l0)
(L'R' : Type)
(s' :
InSort
S L'
R')
(yL :
L' ->
GenNo
S)
(yR :
R' ->
GenNo
S)
(ycut :
forall
(l0 : L')
(r0 : R'),
yL l0 <
yR r0)
(fyL :
L' ->
No)
(fyR :
R' ->
No)
(fycut :
forall
(l0 : L')
(r0 : R'),
fyR
r0 <
fyL
l0)
(_ :
foralll0 : L,
xL l0 <
{{ yL | yR//ycut }})
(dp :
foralll0 : L,
{{ fyR | fyL//
fun
(r0 : R')
(l1 : L')
=>
fycut
l1 r0 }} <
fxL
l0)
(_ :
forallr0 : R',
{{ xL | xR//xcut }} <
yR r0)
(dq :
forallr0 : R',
fyR
r0 <
{{ fxR | fxL//
fun
(r1 : R)
(l0 : L)
=>
fxcut
l0 r1 }})
=>
le_lr
fyR
fyL
(fun
(r0 : R')
(l0 : L')
=>
fycut
l0 r0)
fxR
fxL
(fun
(r0 : R)
(l0 : L)
=>
fxcut
l0 r0)
(funl0 : R'
=>
dq l0)
(funr0 : L
=>
dp r0))
(fun
(LR : Type)
(s :
InSort
S L R)
(xL :
L ->
GenNo
S)
(xR :
R ->
GenNo
S)
(xcut :
forall
(l0 : L)
(r0 : R),
xL l0 <
xR r0)
(fxL :
L ->
No)
(fxR :
R ->
No)
(fxcut :
forall
(l0 : L)
(r0 : R),
fxR
r0 <
fxL
l0)
(L'R' : Type)
(s' :
InSort
S L'
R')
(yL :
L' ->
GenNo
S)
(yR :
R' ->
GenNo
S)
(_ :
forall
(l0 : L')
(r0 : R'),
yL l0 <
yR r0)
(fyL :
L' ->
No)
(fyR :
R' ->
No)
(fycut :
forall
(l0 : L')
(r0 : R'),
fyR
r0 <
fyL
l0)
(l0 : L')
(_ :
{{ xL | xR//xcut }} <=
yL l0)
(dp :
fyL
l0 <=
{{ fxR | fxL//
fun
(r0 : R)
(l1 : L)
=>
fxcut
l1 r0 }})
=>
lt_r
fyR
fyL
(fun
(r0 : R')
(l1 : L')
=>
fycut
l1 r0)
fxR
fxL
(fun
(r0 : R)
(l1 : L)
=>
fxcut
l1 r0)
l0 dp)
(fun
(LR : Type)
(s :
InSort
S L R)
(xL :
L ->
GenNo
S)
(xR :
R ->
GenNo
S)
(_ :
forall
(l0 : L)
(r0 : R),
xL l0 <
xR r0)
(fxL :
L ->
No)
(fxR :
R ->
No)
(fxcut :
forall
(l0 : L)
(r0 : R),
fxR
r0 <
fxL
l0)
(L'R' : Type)
(s' :
InSort
S L'
R')
(yL :
L' ->
GenNo
S)
(yR :
R' ->
GenNo
S)
(ycut :
forall
(l0 : L')
(r0 : R'),
yL l0 <
yR r0)
(fyL :
L' ->
No)
(fyR :
R' ->
No)
(fycut :
forall
(l0 : L')
(r0 : R'),
fyR
r0 <
fyL
l0)
(r0 : R)
(_ :
xR r0 <=
{{ yL | yR//ycut }})
(dp :
{{ fyR | fyL//
fun
(r1 : R')
(l0 : L')
=>
fycut
l0 r1 }} <=
fxR
r0)
=>
lt_l
fyR
fyL
(fun
(r1 : R')
(l0 : L')
=>
fycut
l0 r1)
fxR
fxL
(fun
(r1 : R)
(l0 : L)
=>
fxcut
l0 r1)
r0 dp)
(xL l)
(xR r)
(xcut
l r) }} =
{{ funr : R => negate (xR r) | (funl : L =>
negate (xL l))//?nxcut }}
reflexivity.Defined.(** The following proof verifies that [No_rec] applied to a cut reduces definitionally to a cut with the expected options (although it does produce quite a large term). *)Context `{InSort S Empty Empty} `{InSort S Unit Empty}.
S: OptionSort H: HasNegation S No:= GenNo S: Type H0: InSort S Empty Empty H1: InSort S Unit Empty
negate one = minusone
S: OptionSort H: HasNegation S No:= GenNo S: Type H0: InSort S Empty Empty H1: InSort S Unit Empty
negate one = minusone
S: OptionSort H: HasNegation S No:= GenNo S: Type H0: InSort S Empty Empty H1: InSort S Unit Empty