+coercion segment_square_of_ordered_set_square with 0 2 nocomposites.
+
+alias symbol "pi1" (instance 4) = "exT \fst".
+alias symbol "pi1" (instance 2) = "exT \fst".
+lemma ordered_set_square_of_segment_square :
+ ∀O:ordered_set.∀u,v:O.{[u,v]} squareO → O squareO ≝
+ λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉.
+
+coercion ordered_set_square_of_segment_square nocomposites.
+
+lemma restriction_agreement :
+ ∀O:ordered_uniform_space.∀l,r:O.∀P:{[l,r]} squareO → Prop.∀OP:O squareO → Prop.Prop.
+apply(λO:ordered_uniform_space.λl,r:O.
+ λP:{[l,r]} squareO → Prop. λOP:O squareO → Prop.
+ ∀b:O squareO.∀H1,H2.(P b → OP b) ∧ (OP b → P b));
+[5,7: apply H1|6,8:apply H2]skip;
+qed.
+
+lemma unrestrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO.
+ restriction_agreement ? l r U u → U x → u x.
+intros 7; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b b1 x;
+cases (H 〈w1,w2〉 H1 H2) (L _); intro Uw; apply L; apply Uw;
+qed.
+
+lemma restrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO.
+ restriction_agreement ? l r U u → u x → U x.
+intros 6; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b1 b x;
+intros (Ra uw); cases (Ra 〈w1,w2〉 H1 H2) (_ R); apply R; apply uw;
+qed.
+
+lemma invert_restriction_agreement:
+ ∀O:ordered_uniform_space.∀l,r:O.
+ ∀U:{[l,r]} squareO → Prop.∀u:O squareO → Prop.
+ restriction_agreement ? l r U u →
+ restriction_agreement ? l r (\inv U) (\inv u).
+intros 9; split; intro;
+[1: apply (unrestrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3);
+|2: apply (restrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3);]
+qed.
+
+lemma bs2_of_bss2:
+ ∀O:ordered_set.∀u,v:O.(bishop_set_of_ordered_set {[u,v]}) squareB → (bishop_set_of_ordered_set O) squareB ≝
+ λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉.
+
+coercion bs2_of_bss2 nocomposites.