Built with
Alectryon , running Coq+SerAPI v8.13.0+0.13.0. 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 .
From mathcomp Require Import all_ssreflect finmap.Notation "[ rel _ _ | _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]Notation "[ rel _ _ : _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]Notation "[ rel _ _ in _ & _ | _ ]" was already used
in scope fun_scope. [notation-overridden,parsing]Notation "[ rel _ _ in _ & _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]Notation "[ rel _ _ in _ | _ ]" was already used in
scope fun_scope. [notation-overridden,parsing]Notation "[ rel _ _ in _ ]" was already used in scope
fun_scope. [notation-overridden,parsing]Notation "_ + _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ - _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ <= _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ < _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ >= _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ > _" was already used in scope nat_scope.
[notation-overridden,parsing]Notation "_ <= _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing]Notation "_ < _ <= _" was already used in scope
nat_scope. [notation-overridden,parsing]Notation "_ <= _ < _" was already used in scope
nat_scope. [notation-overridden,parsing]Notation "_ < _ < _" was already used in scope
nat_scope. [notation-overridden,parsing]Notation "_ * _" was already used in scope nat_scope.
[notation-overridden,parsing]
From hanoi Require Import extra gdist ghanoi ghanoi4 triangular phi rhanoi3 psi.
Set Implicit Arguments .
Unset Strict Implicit .
(******************************************************************************)
(* *)
(* This file proves the formula that gives the distance between two perfect *)
(* configurations. It follows the proof given by Thierry Bousch in *)
(* La quatriΓ¨me tour de HanoΔ±Μ *)
(* *)
(******************************************************************************)
Section Hanoi4 .
Local Notation "c1 `-->_r c2" := (rmove c1 c2)
(format "c1 `-->_r c2" , at level 60 ).
Local Notation "c1 `-->*_r c2" := (connect rmove c1 c2)
(format "c1 `-->*_r c2" , at level 60 ).
Lemma gdist_leq (n : nat) (p1 p2 : peg 4 ) :
`d[`c[p1, n], `c[p2, n]]_rmove <= Ο(n).`d[`c[p1 , n], `c[p2 , n]]_rmove <= Ο(n)
Proof .2
have [/eqP->|p1Dp2] := boolP (p1 == p2); first by rewrite gdist0.`d[`c[p1], `c[p2]]_rmove <= Ο(n)
elim /ltn_ind: n p1 p2 p1Dp2 => [] [|[|n]] IH p1 p2 p1Dp2.IH : forall m : nat,
m < 0 ->
forall p1 p2 : peg 4 ,
p1 != p2 -> `d[`c[p1], `c[p2]]_rmove <= Ο(m)
6 d `d[`c[p1], `c[p2]]_rmove <= Ο(0 )
- 10
rewrite (_ : `c[p1] = `c[p2]) ?gdist0 //.
by apply /ffunP => [] [].
- 24
rewrite -[phi 1 ]/(size [:: `c[p2, 1 ]]).17 `d[`c[p1], `c[p2]]_rmove <= size [:: `c[p2 , 1 ]]
26
apply : gdist_path_le => //=.17 (`c[p1] `-->_r `c[p2]) && true
26
rewrite andbT; apply /moveP; exists ldisk ; split => //=.17 rrel (n:=4 ) (`c[p1] ldisk) (`c[p2] ldisk)
- 31
by rewrite !ffunE.
- 3d
by move => [[|]].
- 42
by apply /on_topP => [] [].
by apply /on_topP => [] [].
pose p3 := `p[p1, p2].5 1c 6 d p3 := `p[p1, p2] : peg 4
1d
set k := gmin n.+2 .
set k1 := k.-1 .+1 .
have kP : 0 < k by apply : gmin_gt0.
have k1Lm2 : k1 < n.+2 by rewrite [k1]prednK //; apply : gmin_lt.5 1c 6 d 50 55 5a 5f k1Lm2 : k1 < n.+2
1d
have k1Lm2S : k1 <= n.+2 by apply : ltnW.5 1c 6 d 50 55 5a 5f 64 k1Lm2S : k1 <= n.+2
1d
rewrite -[in X in X <= _](subnK k1Lm2S); set k2 := _ - _.5 1c 6 d 50 55 5a 5f 64 69 k2 := n.+2 - k1 : nat
1d
rewrite -perfect_liftrn; set c1 := cliftrn _ _ _.5 1c 6 d 50 55 5a 5f 64 69 6e c1 := cliftrn (q:=4 ) k2 (n:=k1) p1 `c[p1] : configuration 4 (k2 + k1)
`d[c1, `c[p2]]_rmove <= Ο(n.+2 )
rewrite -perfect_liftrn; set c4 := cliftrn _ _ _.5 1c 6 d 50 55 5a 5f 64 69 6e 73 c4 := cliftrn (q:=4 ) k2 (n:=k1) p2 `c[p2] : configuration 4 (k2 + k1)
`d[c1, c4]_rmove <= Ο(n.+2 )
pose c2 : _ _ (k2 + k1) := cliftrn k2 p1 `c[p3].5 1c 6 d 50 55 5a 5f 64 69 6e 73 79 c2 := cliftrn (q:=4 ) k2 (n:=k1) p1 `c[p3]
: configuration 4 (k2 + k1) : configuration 4 (k2 + k1)
7a
pose c3 : _ _ (k2 + k1) := cliftrn k2 p2 `c[p3].5 1c 6 d 50 55 5a 5f 64 69 6e 73 79 7f c3 := cliftrn (q:=4 ) k2 (n:=k1) p2 `c[p3]
: configuration 4 (k2 + k1) : configuration 4 (k2 + k1)
7a
apply : leq_trans (_ : _ <= gdist rmove c1 c2 + _) _.83 `d[c1, c4]_rmove <= `d[c1, c2]_rmove + ?Goal
by apply : gdist_triangular.83 `d[c1, c2]_rmove + `d[c2, c4]_rmove <= Ο(n.+2 )
rewrite phi_gmin /g -/k -/k1 -addnn -addnA.83 `d[c1, c2]_rmove + `d[c2, c4]_rmove <=
Ο(k) + (Ο(k) + (2 ^ (n.+2 - k)).-1 )
apply : leq_add.83 `d[c1, c2]_rmove <= Ο(k)
apply : leq_trans.83 `d[c1, c2]_rmove <= ?Goal0
apply : gdist_merger; first by apply : rirr.83 connect (move (q:=4 ) (rrel (n:=4 ))) `c[p1] `c[p3]
by apply : connect_move.
rewrite -(prednK kP).83 `d[`c[p1], `c[p3]]_(move (q:=4 ) (rrel (n:=4 ))) <=
Ο(k.-1 .+1 )
98
apply : IH => //.5 6 d 50 55 5a 5f 64 69 6e 73 79 7f 84
p1 != p3
98
by rewrite eq_sym opegDl.
apply : leq_trans (_ : _ <= gdist rmove c2 c3 + _) _.83 `d[c2, c4]_rmove <= `d[c2, c3]_rmove + ?Goal
by apply : gdist_triangular.83 `d[c2, c3]_rmove + `d[c3, c4]_rmove <=
Ο(k) + (2 ^ (n.+2 - k)).-1
rewrite addnC.83 `d[c3, c4]_rmove + `d[c2, c3]_rmove <=
Ο(k) + (2 ^ (n.+2 - k)).-1
apply : leq_add.83 `d[c3, c4]_rmove <= Ο(k)
apply : leq_trans.83 `d[c3, c4]_rmove <= ?Goal0
apply : gdist_merger; first apply : rirr.83 connect (move (q:=4 ) (rrel (n:=4 ))) `c[p3] `c[p2]
by apply : connect_move.
rewrite -(prednK kP).83 `d[`c[p3], `c[p2]]_(move (q:=4 ) (rrel (n:=4 ))) <=
Ο(k.-1 .+1 )
cb
apply : IH => //.
by rewrite opegDr.
rewrite /c2 /c3; move : p1Dp2.5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84
p1 != p2 ->
`d[cliftrn (q:=4 ) k2 (n:=k1) p1 `c[p3], cliftrn (q:=4 )
k2 (n:=k1)
p2 `c[p3]]_rmove <=
(2 ^ (n.+2 - k)).-1
have [p2' -> p2'E] := unlift_some (opegDr p1 p2).5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84 p2' : 'I_4.-1
p2'E : unlift `p[p1, lift `p[p1, p2] p2']
(lift `p[p1, p2] p2') =
Some p2'
p1 != lift `p[p1, p2] p2' ->
`d[cliftrn (q:=4 ) k2 (n:=k1) p1 `c[p3], cliftrn (q:=4 )
k2 (n:=k1)
(lift
`p[p1, p2]
p2')
`c[p3]]_rmove <=
(2 ^ (n.+2 - k)).-1
rewrite -/p3.f0 p1 != lift p3 p2' ->
`d[cliftrn (q:=4 ) k2 (n:=k1) p1 `c[p3], cliftrn (q:=4 )
k2 (n:=k1)
(lift p3 p2')
`c[p3]]_rmove <=
(2 ^ (n.+2 - k)).-1
have [p1' -> p1'E] := unlift_some (opegDl p1 p2).5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84 f1 f2 p1' : 'I_4.-1
p1'E : unlift `p[lift `p[p1, p2] p1', p2]
(lift `p[p1, p2] p1') =
Some p1'
lift `p[p1, p2] p1' != lift p3 p2' ->
`d[cliftrn (q:=4 ) k2 (n:=k1) (lift `p[p1, p2] p1')
`c[p3], cliftrn (q:=4 ) k2 (n:=k1) (lift p3 p2')
`c[p3]]_rmove <= (2 ^ (n.+2 - k)).-1
move => p1Dp2.5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84 f1 f2 fc fd p1Dp2 : lift `p[p1, p2] p1' != lift p3 p2'
`d[cliftrn (q:=4 ) k2 (n:=k1) (lift `p[p1, p2] p1')
`c[p3], cliftrn (q:=4 ) k2 (n:=k1) (lift p3 p2')
`c[p3]]_rmove <= (2 ^ (n.+2 - k)).-1
have p1'Dp2' : p1' != p2' by apply : contra p1Dp2 => /eqP->.5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84 f1 f2 fc fd 103 p1'Dp2' : p1' != p2'
104
rewrite -[X in _ <= X]muln1 {11 }(_ : 1 = (p1' != p2')); last first .
by rewrite (negPf p1'Dp2').108 `d[cliftrn (q:=4 ) k2 (n:=k1) (lift `p[p1, p2] p1')
`c[p3], cliftrn (q:=4 ) k2 (n:=k1) (lift p3 p2')
`c[p3]]_rmove <=
(2 ^ (n.+2 - k)).-1 * (p1' != p2')
rewrite -gdist_rhanoi3p -/p3 -!crliftn_perfect -!plift_perfect.108 `d[cliftln (q:=4 ) (m:=k2) k1 p3
(plift (n:=k2) (q:=3 ) p3 `c[p1']), cliftln (q:=4 )
(m:=k2) k1
p3
(plift
(n:=k2)
(q:=3 ) p3
`c[p2'])]_rmove <=
`d[`c[p1'], `c[p2']]_rmove
rewrite -(prednK kP).116
apply : gdist_liftln => [|i j|]; first by apply : rirr.5 1c 6 50 55 5a 5f 64 69 6e 73 79 7f 84 f1 f2 fc fd 103 109 i, j : disk 3
rrel (n:=3 ) i j = rrel (n:=4 ) (lift p3 i) (lift p3 j)
by (apply /idP/idP; apply : contra => /eqP) => [/lift_inj->|->].
by apply : move_connect.
Qed .
Notation " `cut[ a , b ] " := (ccut a b).
Notation " `tuc[ a , b ] " := (ctuc a b).
Notation " `dup[ a , b ] " := (rm_rep a b).
(* This is theorem 2.9 *)
Lemma gdist_le_psi n (u v : configuration 4 n) (p0 p2 p3 : peg 4 ) :
[/\ p3 != p2, p3 != p0 & p2 != p0] ->
(codom v) \subset [:: p2 ; p3] ->
psi (s2f [set i | u i == p0]) <= `d[u, v]_rmove.5 u, v : configuration 4 n
p0, p2, p3 : peg 4
[/\ p3 != p2, p3 != p0 & p2 != p0] ->
codom v \subset [:: p2; p3] ->
psi (s2f (n:=n) [set i | u i == p0]) <= `d[u, v]_rmove
Proof .127
move => pH.5 12a 12b pH : [/\ p3 != p2, p3 != p0 & p2 != p0]
codom v \subset [:: p2; p3] ->
psi (s2f (n:=n) [set i | u i == p0]) <= `d[u, v]_rmove
elim /ltn_ind : n u v p0 p2 p3 pH =>
// [] [|n] IH u v p0 p2 p3 [p3Dp2 p3Dp0 p2Dp0] cH.IH : forall m : nat,
m < 0 ->
forall (u v : configuration 4 m)
(p0 p2 p3 : peg 4 ),
[/\ p3 != p2, p3 != p0 & p2 != p0] ->
codom v \subset [:: p2; p3] ->
psi (s2f (n:=m) [set i | u i == p0]) <=
`d[u, v]_rmove
u, v : configuration 4 0
12b p3Dp2 : p3 != p2
p3Dp0 : p3 != p0
p2Dp0 : p2 != p0
cH : codom v \subset [:: p2; p3]
psi (s2f (n:=0 ) [set i | u i == p0]) <= `d[u, v]_rmove
set E := [set i | _].138 139 12b 13a 13b 13c 13d E := [set i | u i == p0] : {set ordinal_finType 0 }
psi (s2f (n:=0 ) E) <= `d[u, v]_rmove
13f
suff ->: E = set0 by rewrite s2f_set0 psi_set0.
by apply /setP=> [] [].
set E := [set i | _].5 142 143 12b 13a 13b 13c 13d E := [set i | u i == p0] : {set ordinal_finType n.+1 }
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
pose N : disk n.+1 := ldisk.5 142 143 12b 13a 13b 13c 13d 156 N := ldisk : disk n.+1 : disk n.+1
157
have [NiE|NniE] := boolP (N \in E); last first .5 142 143 12b 13a 13b 13c 13d 156 15c NniE : N \notin E
157
have ->: E = E :\ N.
apply /setP=> i; move : NniE; rewrite !inE.5 142 143 12b 13a 13b 13c 13d 156 15c i : ordinal_finType n.+1
u N != p0 -> (u i == p0) = (i != N) && (u i == p0)
16a
by case : (_ =P N) => // <- /negPf->.
rewrite s2f_liftr.160 psi (s2f (n:=n) [set i | β[u] i == p0]) <=
`d[u, v]_rmove
162
apply : leq_trans (gdist_cunlift (connect_move _ _)).160 psi (s2f (n:=n) [set i | β[u] i == p0]) <=
`d[β[u], β[v]]_(move (q:=4 ) (rrel (n:=4 )))
162
by apply : IH (codom_liftr cH).
have uN0 : u N = p0 by move : NiE; rewrite inE => /eqP.5 142 143 12b 13a 13b 13c 13d 156 15c 165 uN0 : u N = p0
157
(* maybe I should do a wlog *)
pose np2 : peg _ := v N.5 142 143 12b 13a 13b 13c 13d 156 15c 165 185 np2 := v N : peg 4 : peg 4
157
have vN2 : v N = np2 by [].5 142 143 12b 13a 13b 13c 13d 156 15c 165 185 18a vN2 : v N = np2
157
pose np3 : peg _ := if np2 == p2 then p3 else p2.5 142 143 12b 13a 13b 13c 13d 156 15c 165 185 18a 18f np3 := (if np2 == p2 then p3 else p2) : peg 4 : peg 4
157
have np2Dp0 : np2 != p0.
have /subsetP /(_ (v N)) := cH.193 (v N \in codom v -> v N \in [:: p2; p3]) -> np2 != p0
199
by rewrite /np2 !inE => /(_ (codom_f v N))/orP[]/eqP->.
have [np3Dp0 np3Dp2] : np3 != p0 /\ np3 != np2.19b np3 != p0 /\ np3 != np2
rewrite /np3; case : (_ =P p2) => [->|/eqP] => //.19b np2 != p2 -> p2 != p0 /\ p2 != np2
1a8
by move => H; split => //; rewrite eq_sym.
have {}cH : codom v \subset [:: np2; np3].1aa codom v \subset [:: np2; np3]
apply /subsetP=> i /(subsetP cH); rewrite /np3 /np2 !inE.5 142 143 12b 13a 13b 13c 13d 156 15c 165 185 18a 18f 194 19c 1ab 1ac i : ordinal_finType 4
(i == p2) || (i == p3) ->
(i == v N) || (i == (if v N == p2 then p3 else p2))
1b8
have := subsetP cH (v N); rewrite !inE codom_f => /(_ isT) /orP[] /eqP->.1bf (i == p2) || (i == p3) ->
(i == p2) || (i == (if p2 == p2 then p3 else p2))
by rewrite eqxx.
by rewrite orbC ifN.
have uDv : u != v.
by apply : contra_neq np2Dp0 => uE; rewrite -uN0 uE vN2.
have /gpath_connect [g gHuv] := connect_move u v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 g : seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ))
gHuv : gpath rmove u v g
157
have vIg : v \in g.
by have := mem_last u g; rewrite inE (gpath_last gHuv) eq_sym (negPf uDv).
pose E' := [set i | [exists c , (c \in (u :: g)) && (c i == np3)]] :&: E.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 E' := [set i | [exists c ,
(c \in u :: g) && (c i == np3)]] :&: E : {set ordinal_finType n.+1 }
157
have [Ez|EnZ] := boolP (E' == set0).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef Ez : E' == set0
157
pose P := [set ~ np3].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 P := [set ~ np3] : {set ordinal_finType 4 }
157 1f5
have aH : all (cvalid E P) (u :: g).1fc all (cvalid (n:=n.+1 ) E (k:=4 ) P) (u :: g)
apply /allP => c cIg; apply /cvalidP => /= i iIE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd c : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
cIg : c \in u :: g
i : 'I_n.+1
iIE : i \in E
c i \in P
202
rewrite !inE; apply /eqP=> ciP3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 20a 20b 20c 20d ciP3 : c i = np3
False
202
have /eqP/setP/(_ i) := Ez.212 (i \in E') = (i \in set0) -> False
202
rewrite [in _ \in set0]inE => /idP[].
rewrite 2 !inE iIE andbT.212 [exists c , (c \in u :: g) && (c i == np3)]
202
by apply /existsP; exists c ; rewrite cIg; apply /eqP.
have p0Isp : p0 \in P by rewrite !inE eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 p0Isp : p0 \in P
157 1f5
have F pg1 pg2 : pg1 \in P -> pg2 \in P -> rrel pg1 pg2 ->
rrel (enum_rank_in p0Isp pg1) (enum_rank_in p0Isp pg2).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 pg1, pg2 : ordinal_finType 4
pg1 \in P ->
pg2 \in P ->
rrel (n:=4 ) pg1 pg2 ->
rrel (n:=#|[eta P]|)
(enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp pg1)
(enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp pg2)
rewrite !inE /rrel /= => pg1Dp3 pg2Dpg3 pg1Dpg2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 22d pg1Dp3 : pg1 != np3
pg2Dpg3 : pg2 != np3
pg1Dpg2 : pg1 != pg2
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp pg1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp pg2
22f
apply : contra_neq pg1Dpg2 => /enum_rank_in_inj.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 22d 237 238
(pg1 \in P -> pg2 \in P -> pg1 = pg2) -> pg1 = pg2
22f
by rewrite !inE; apply .
apply : leq_trans (gpath_cset2 F aH gHuv).231 psi (s2f (n:=n.+1 ) E) <=
`d[cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp u,
cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp v]_
(move (q:=#|P|) (rrel (n:=#|[eta P]|)))
1f5
have -> : cset2 E p0Isp u = `c[enum_rank_in p0Isp p0].231 cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp u =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p0]
apply /ffunP=> i.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 232 i : ordinal_finType #|E|
cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp u i =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p0] i
24b
rewrite !ffunE; congr (enum_rank_in _ _).251 u (enum_val i) = p0
24b
by have := enum_valP i; rewrite !inE => /eqP.231 psi (s2f (n:=n.+1 ) E) <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p0], cset2 (n:=n.+1 ) E (k:=4 )
(sp:=P) (p0:=p0) p0Isp v]_
(move (q:=#|P|) (rrel (n:=#|[eta P]|)))
1f5
have -> : cset2 E p0Isp v = `c[enum_rank_in p0Isp np2].231 cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp v =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2]
apply /ffunP=> i.251 cset2 (n:=n.+1 ) E (k:=4 ) (sp:=P) (p0:=p0) p0Isp v i =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2] i
260
rewrite !ffunE; congr (enum_rank_in _ _).251 v (enum_val i) = np2
260
have := subsetP cH (v (enum_val i)); rewrite !inE codom_f => /(_ isT).251 (v (enum_val i) == np2) || (v (enum_val i) == np3) ->
v (enum_val i) = np2
260
case /orP=> /eqP //.251 v (enum_val i) = np3 -> v (enum_val i) = np2
260
have /eqP/setP/(_ (enum_val i)) := Ez.251 (enum_val i \in E') = (enum_val i \in set0) ->
v (enum_val i) = np3 -> v (enum_val i) = np2
260
have := enum_valP i.251 enum_val i \in E ->
(enum_val i \in E') = (enum_val i \in set0) ->
v (enum_val i) = np3 -> v (enum_val i) = np2
260
rewrite !inE => -> /idP/negP; rewrite andbT negb_exists.251 [forall x ,
~~ ((x \in u :: g) && (x (enum_val i) == np3))] ->
v (enum_val i) = np3 -> v (enum_val i) = np2
260
by move => /forallP/(_ v); rewrite -{1 }(gpath_last gHuv) mem_last => /= /eqP.231 psi (s2f (n:=n.+1 ) E) <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p0], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=P) p0Isp
np2]]_(move (q:=#|P|)
(rrel
(n:=#|[eta P]|)))
1f5
have : (enum_rank_in p0Isp p0) != (enum_rank_in p0Isp np2).231 enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p0
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2
rewrite eq_sym; apply /eqP => /enum_rank_in_inj.231 (np2 \in P -> p0 \in P -> np2 = p0) -> False
287
rewrite !inE eq_sym np3Dp2 eq_sym np3Dp0 => /(_ isT isT) H.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 232 H : np2 = p0
214 287
by case /eqP: np2Dp0.231 enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p0
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2 ->
psi (s2f (n:=n.+1 ) E) <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p0], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=P) p0Isp
np2]]_(move (q:=#|P|)
(rrel
(n:=#|[eta P]|)))
1f5
have U : #|P| = 3 .
have := cardsC [set np3]; rewrite -/P.231 #|[set np3]| + #|P| = #|ordinal_finType 4 | -> #|P| = 3
29b
by rewrite cards1 add1n card_ord => [] [].
move : (enum_rank_in p0Isp p0) (enum_rank_in p0Isp np2).29d forall
enum_rank_in
enum_rank_in0 : ordinal_subType #|[eta P]|,
enum_rank_in != enum_rank_in0 ->
psi (s2f (n:=n.+1 ) E) <=
`d[`c[enum_rank_in], `c[enum_rank_in0]]_(move
(q:=#|P|)
(rrel
(n:=#|[eta P]|)))
1f5
rewrite U => u1 v1 u1Dv1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 1f4 1fd 205 228 232 29e u1, v1 : ordinal_subType 3
u1Dv1 : u1 != v1
psi (s2f (n:=n.+1 ) E) <=
`d[`c[u1], `c[v1]]_(move (q:=3 ) (rrel (n:=3 )))
1f5
rewrite gdist_rhanoi3p (negPf u1Dv1) muln1 -card_s2f.2ad psi (s2f (n:=n.+1 ) E) <= (2 ^ #|` s2f (n:=n.+1 ) E|).-1
1f5
by apply : psi_exp.
rewrite -card_gt0 in EnZ.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef EnZ : 0 < #|E'|
157
case : (eq_bigmax_cond (@nat_of_ord _) EnZ) => /= T TinE' Tmax.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc T : 'I_n.+1
TinE' : T \in E'
Tmax : \max_(i in E') i = T
157
have {}Tmax := sym_equal Tmax.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 Tmax : T = \max_(i in E') i
157
have uT0 : u T = p0.
by apply /eqP; move : TinE'; rewrite !inE => /andP[].
pose E'' := [set i in E | i > T].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 E'' := [set i in E | T < i] : {set ordinal_finType n.+1 }
157
pose K := #|E''|.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 K := #|E''| : nat
157
have memE'' c i : c \in u :: g -> i \in E'' -> c i != np3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 20a 171
c \in u :: g -> i \in E'' -> c i != np3
move => cIug; rewrite inE => /andP[iIE].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 20a 171 cIug : c \in u :: g
20d T < i -> c i != np3
2e3
rewrite ltnNge Tmax; apply : contra => ciE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 20a 171 2eb 20d ciE : c i == np3
i <= \max_(i in E') i
2e3
apply : leq_bigmax_cond; rewrite inE iIE andbT inE.
by apply /existsP; exists c ; rewrite cIug.
pose ST1 := isO n.+1 T.+1 .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 2e6 ST1 := isO n.+1 T.+1 : {set ordinal_finType n.+1 }
157
have cST1 : #|ST1| = T.+1 by rewrite card_isO; apply /minn_idPr.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 2e6 2fd cST1 : #|ST1| = T.+1
157
(* This 3.2 *)
have KTE : T + K <= n.
rewrite -ltnS -{2 }[n.+1 ]card_ord -addSn.301 T.+1 + K <= #|'I_n.+1 |
307
rewrite -[_ + _]subn0 -(_ : #|ST1 :&: E''| = 0 ); last first .
apply /eqP; rewrite cards_eq0; apply /eqP/setP => i.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c2 2c8 2d0 2d8 2dd 2e6 2fd 302 171
(i \in ST1 :&: E'') = (i \in set0)
313
rewrite /ST1 !inE; apply /idP => /and3P[].319 i < T.+1 -> u i == p0 -> T < i -> False
313
by rewrite ltnS leqNgt => /negPf->.
by rewrite -cST1 -cardsU max_card.
move : TinE'.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a
T \in E' -> psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite !inE => /andP[/existsP[/= c_p3 /andP[]]].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a c_p3 : {ffun 'I_n.+1 -> 'I_4}
c_p3 \in u :: g ->
c_p3 T == np3 ->
u T == p0 -> psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite inE => /orP[/eqP->|]; first by rewrite uT0 eq_sym (negPf np3Dp0).32d c_p3 \in g ->
c_p3 T == np3 ->
u T == p0 -> psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
move => c_p3Ig /eqP c_p3T3 _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e c_p3Ig : c_p3 \in g
c_p3T3 : c_p3 T = np3
157
case (@split_first _ g (fun c : configuration _ _ => c(T) != p0)).337 ~~
all [predC fun c : configuration 4 n.+1 => c T != p0]
g
apply /negP=> /allP /(_ _ vIg); rewrite /= -topredE negbK.
have /subsetP/(_ (v T))/(_ (codom_f _ _)) := cH.337 v T \in [:: np2; np3] -> v T == p0 -> False
33e
by rewrite !inE => /orP[] /eqP->; rewrite (negPf np2Dp0, negPf np3Dp0).337 forall
x : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) *
seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )) *
seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )),
[/\ all
[predC fun c : configuration 4 n.+1 => c T != p0]
x.1 .2 , x.1 .1 T != p0
& g = x.1 .2 ++ x.1 .1 :: x.2 ] ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
move => [[x0s x0sb] x0sa] /= [/allP x0sbP0 x0TD0 gE].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 x0s : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )
x0sb, x0sa : seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ))
x0sbP0 : {in x0sb,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : configuration 4 n.+1 =>
c T != p0] x}
x0TD0 : x0s T != p0
gE : g = x0sb ++ x0s :: x0sa
157
pose x0 := last u x0sb.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 x0 := last u x0sb: configuration 4 n.+1
157
move : (gHuv); rewrite gE => /gpath_catl; rewrite -/x0 => gHux0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a gHux0 : gpath rmove u x0 x0sb
157
move : (gHuv); rewrite gE => /gpath_catr; rewrite -/x0 => gHx0v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f gHx0v : gpath rmove x0 v (x0s :: x0sa)
157
move : (gHuv); rewrite gE => /gdist_cat; rewrite -/x0 => duvE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 duvE : `d[u, v]_rmove =
`d[u, x0]_rmove + `d[x0, v]_rmove
157
have x0T0 : x0 T = p0.
have := mem_last u x0sb; rewrite !inE /x0 => /orP[/eqP->|/x0sbP0] //.368 [predC fun c : configuration 4 n.+1 => c T != p0]
(last u x0sb) -> last u x0sb T = p0
36e
by rewrite /= -topredE negbK => /eqP.
have x0TDx0sT : x0 T != x0s T by rewrite x0T0 eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 x0TDx0sT : x0 T != x0s T
157
have x0sTD0 : x0s T != p0 by rewrite eq_sym -x0T0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d x0sTD0 : x0s T != p0
157
have x0Mx0s : x0 `-->_r x0s.
by move : (gpath_path gHuv); rewrite gE cat_path /= -/x0 => /and3P[].
case (@split_first _ (x0s :: x0sa)
(fun c : configuration _ _ => c(T) == np3)).389 ~~
all [predC fun c : configuration 4 n.+1 => c T == np3]
(x0s :: x0sa)
have c_p3Ix0sa : c_p3 \in x0s :: x0sa.
move : c_p3Ig; rewrite gE mem_cat => /orP[/x0sbP0|//].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a
[predC fun c : configuration 4 n.+1 => c T != p0] c_p3 ->
c_p3 \in x0s :: x0sa
399
by rewrite /= -topredE negbK c_p3T3 (negPf np3Dp0).
apply /negP=> /allP /(_ _ c_p3Ix0sa); rewrite /= -topredE /=.39b c_p3 T != np3 -> False
392
by rewrite c_p3T3 eqxx.389 forall
x : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) *
seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )) *
seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )),
[/\ all
[predC fun c : configuration 4 n.+1 =>
c T == np3] x.1 .2 , x.1 .1 T == np3
& x0s :: x0sa = x.1 .2 ++ x.1 .1 :: x.2 ] ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
move => [[x3 x3b] x3a] [/allP x3bP0 /eqP x3T3 x0sx0saE].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a x3 : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )
x3b, x3a : seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ))
x3bP0 : {in (x3, x3b, x3a).1 .2 ,
forall
x : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ),
[predC fun c : configuration 4 n.+1 =>
c T == np3] x}
x3T3 : (x3, x3b, x3a).1 .1 T = np3
x0sx0saE : x0s :: x0sa =
(x3, x3b, x3a).1 .2 ++
(x3, x3b, x3a).1 .1 :: (x3, x3b, x3a).2
157
pose x3p := last x0 x3b.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 x3p := last x0 x3b: configuration 4 n.+1
157
move : (gHx0v); rewrite x0sx0saE -cat_rcons => /gpath_catl.3b9 gpath rmove x0
(last x0
(rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 ))
(rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 ) ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite last_rcons => gHx0x3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba gHx0x3 : gpath rmove x0 (x3, x3b, x3a).1 .1
(rcons (x3, x3b, x3a).1 .2
(x3, x3b, x3a).1 .1 )
157
move : (gHx0v); rewrite x0sx0saE -cat_rcons => /gpath_catr.3c2 gpath rmove
(last x0
(rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 )) v
(x3, x3b, x3a).2 ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite last_rcons => gHx3v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 gHx3v : gpath rmove (x3, x3b, x3a).1 .1 v
(x3, x3b, x3a).2
157
move : (gHx0v); rewrite x0sx0saE -cat_rcons => /gdist_cat.3cb `d[x0, v]_rmove =
`d[x0, last x0
(rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 )]_rmove +
`d[last x0
(rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 ), v]_rmove ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite last_rcons => dx0vE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc dx0vE : `d[x0, v]_rmove =
`d[x0, (x3, x3b, x3a).1 .1 ]_rmove +
`d[(x3, x3b, x3a).1 .1 , v]_rmove
157
have x3pND3 : x3p T != np3.
have := mem_last x0 x3b; rewrite -/x3p inE => /orP[/eqP->|/x3bP0//].
by rewrite x0T0 eq_sym.
have x3pTDx3T : x3p T != x3 T by rewrite x3T3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd x3pTDx3T : x3p T != x3 T
157
have x3pMx3 : x3p `-->_r x3.
by move : (gpath_path gHx0v); rewrite x0sx0saE cat_path /= => /and3P[].
case (@split_first _ g (fun c : configuration _ _ => c(N) != p0)) => /=.3f0 ~~
all [predC fun c : configuration 4 n.+1 => c N != p0]
g
apply /negP=> /allP /(_ _ vIg); rewrite /= -topredE negbK.
have /subsetP/(_ (v N))/(_ (codom_f _ _)) := cH.3f0 v N \in [:: np2; np3] -> v N == p0 -> False
3f9
by rewrite !inE => /orP[] /eqP->; rewrite (negPf np2Dp0, negPf np3Dp0).
move => [[z0s z0sb] z0sa] /= [/allP z0sbP0 z0sND0 gE'].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 z0s : {ffun 'I_n.+1 -> 'I_4}
z0sb, z0sa : seq {ffun 'I_n.+1 -> 'I_4}
z0sbP0 : {in z0sb,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : configuration 4 n.+1 =>
c N != p0] x}
z0sND0 : z0s N != p0
gE' : g = z0sb ++ z0s :: z0sa
157
pose z0 := last u z0sb.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f z0 := last u z0sb: configuration 4 n.+1
157
have z0N0 : z0 N = p0.
have := mem_last u z0sb; rewrite !inE /z0 => /orP[/eqP->|/z0sbP0] //.413 [predC fun c : configuration 4 n.+1 => c N != p0]
(last u z0sb) -> last u z0sb N = p0
419
by rewrite /= -topredE negbK => /eqP.
have z0NDz0sN : z0 N != z0s N by rewrite z0N0 eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c z0NDz0sN : z0 N != z0s N
157
have z0Mz0s : z0 `-->_r z0s.
by move : (gpath_path gHuv); rewrite gE' cat_path /= => /and3P[].
move : (gHuv); rewrite gE' => /gpath_catl; rewrite -/z0 => gHuz0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 gHuz0 : gpath rmove u z0 z0sb
157
move : (gHuv); rewrite gE' => /gpath_catr; rewrite -/z0 => gHz0v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 gHz0v : gpath rmove z0 v (z0s :: z0sa)
157
move : (gHuv); rewrite gE' => /gdist_cat; rewrite -/z0 => duvE1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d duvE1 : `d[u, v]_rmove =
`d[u, z0]_rmove + `d[z0, v]_rmove
157
case (@split_last _ (z0 :: z0s :: z0sa)
(fun c : configuration _ _ => c(N) != np2)).441 ~~
all [predC fun c : configuration 4 n.+1 => c N != np2]
[:: z0, z0s & z0sa]
have z0Iz0sz0sa : z0 \in z0 :: z0s :: z0sa by rewrite inE eqxx.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 z0Iz0sz0sa : z0 \in [:: z0, z0s & z0sa]
446 447
apply /negP=> /allP /(_ _ z0Iz0sz0sa); rewrite /= -topredE negbK.44d z0 N == np2 -> False
447
by rewrite z0N0 eq_sym (negPf np2Dp0).
move => [[z2p z2b] [|z2 z2a]] /= [z2pN2 z2aDp2 z0sz0saE].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 z2p : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
z2b : seq
(finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ))
z2pN2 : z2p N != np2
z2aDp2 : true
z0sz0saE : [:: z0, z0s & z0sa] = z2b ++ [:: z2p]
157
have : last z0 (z0s :: z0sa) = z2p.459 last z0 (z0s :: z0sa) = z2p
by rewrite -[last _ _]/(last z0 (z0 :: z0s :: z0sa)) z0sz0saE last_cat.
move : (gpath_last gHuv); rewrite gE' last_cat /= => -> vEz2p.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 45c 45d 45e vEz2p : v = z2p
157 45f
by case /eqP: z2pN2; rewrite -vEz2p.
have {}z2aEp2 z : z \in z2 :: z2a -> z N = np2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 465 z : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
z \in z2 :: z2a -> z N = np2
case /andP: z2aDp2; rewrite -topredE /= negbK => /eqP z2NEp2 /allP z2aDp2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 465 47c z2NEp2 : z2 N = np2
z2aDp2 : {in z2a,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : configuration 4 n.+1 =>
c N != np2] x}
47d 47e
rewrite inE => /orP[/eqP->|/z2aDp2 /=] //.485 z \notin (fun c : configuration 4 n.+1 => c N != np2) ->
z N = np2
47e
by rewrite -topredE negbK => /eqP.
have z0Ez2p : z2b = [::] -> z0 = z2p by case : z2b z0sz0saE => [[]|].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 465 481 z0Ez2p : z2b = [::] -> z0 = z2p
157
have {}z0sz0saE : z0s :: z0sa = (rcons (behead (rcons z2b z2p)) z2) ++ z2a.492 z0s :: z0sa = rcons (behead (rcons z2b z2p)) z2 ++ z2a
case : (z2b) z0sz0saE => [[_ -> ->]|zz ll [_ ->]] //=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 zz : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
ll : seq
(finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ))
ll ++ [:: z2p, z2 & z2a] =
rcons (rcons ll z2p) z2 ++ z2a
498
by rewrite !cat_rcons.
move : (gHz0v); rewrite z0sz0saE => /gpath_catl; rewrite last_rcons => gHz0z2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b gHz0z2 : gpath rmove z0 z2
(rcons (behead (rcons z2b z2p)) z2)
157
move : (gHz0v); rewrite z0sz0saE => /gpath_catr; rewrite last_rcons => gHz2v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa gHz2v : gpath rmove z2 v z2a
157
move : (gHz0v); rewrite z0sz0saE => /gdist_cat; rewrite last_rcons => dz0vE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af dz0vE : `d[z0, v]_rmove =
`d[z0, z2]_rmove + `d[z2, v]_rmove
157
have z2Ig : z2 \in g.
by rewrite gE' z0sz0saE !(inE, mem_cat, mem_rcons, eqxx, orbT).
have z2N2 : z2 N = np2 by apply : z2aEp2; rewrite inE eqxx.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc z2N2 : z2 N = np2
157
have z2pNDz2N : z2p N != z2 N by rewrite z2N2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 z2pNDz2N : z2p N != z2 N
157
have z2pMz2 : z2p `-->_r z2.
move : gHz0z2; case : (z2b) z0Ez2p => [->// /gpath_path/andP[] |a l _] //=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 49b 4af 4b4 4bc 4c4 4c9 a : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
l : seq
(finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ))
gpath rmove z0 z2 (rcons (rcons l z2p) z2) ->
z2p `-->_r z2
4ce
by rewrite -cats1 => /gpath_catr; rewrite last_rcons => /gpath_path/andP[].
(* This is 3.3 *)
have duz0_leq : psi (s2f (E :\ N)) <= `d[u, z0]_rmove.4d0 psi (s2f (n:=n.+1 ) (E :\ N)) <= `d[u, z0]_rmove
rewrite s2f_liftr.4d0 psi (s2f (n:=n) [set i | β[u] i == p0]) <=
`d[u, z0]_rmove
4e0
have /peg4comp2[pp2 [pp3 [[H1 H2 H3] [H4 H5] H6]]] := z0sND0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 pp2, pp3 : peg 4
H1 : pp3 != pp2
H2 : pp3 != p0
H3 : pp3 != z0s N
H4 : pp2 != p0
H5 : pp2 != z0s N
H6 : forall p : peg 4 ,
[\/ p = z0s N, p = p0, p = pp2 | p = pp3]
4e7 4e0
have cH1 : codom β[z0] \subset [::pp2; pp3].4eb codom β[z0] \subset [:: pp2; pp3]
apply /subsetP=> i; rewrite !inE => /codomP[j].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4ec 4ed 4ee 4ef 4f0 4f1 4f2 1c0 j : ordinal_finType n
i = β[z0] j -> (i == pp2) || (i == pp3)
4f7
rewrite !ffunE => ->.4fe (z0 (trshift 1 j) == pp2) || (z0 (trshift 1 j) == pp3)
4f7
case : (H6 (z0 (trshift 1 j))) => [/eqP|/eqP|->|->]; last 2 first .4fe (pp2 == pp2) || (pp2 == pp3)
- 506
by rewrite eqxx.
- 512
by rewrite eqxx orbT.
- 517
by rewrite (negPf ( move_on_toplDr z0Mz0s z0NDz0sN _)) // -ltnS.
by rewrite -z0N0 (negPf ( move_on_toplDl z0Mz0s z0NDz0sN _)) //=.
apply : leq_trans (gdist_cunlift (connect_move _ _)).4f9 psi (s2f (n:=n) [set i | β[u] i == p0]) <=
`d[β[u], β[z0]]_(move (q:=4 ) (rrel (n:=4 )))
4e0
by apply : IH cH1.
(* This is 3.4 *)
pose ST := isO n.+1 T.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 ST := isO n.+1 T : {set ordinal_finType n.+1 }
157
have cST : #|ST| = T by rewrite card_isO; apply /minn_idPr; rewrite ltnW.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c cST : #|ST| = T
157
have dux0_leq : psi ((s2f E) `&` `[T]) <= `d[u, x0]_rmove.530 psi (s2f (n:=n.+1 ) E `&` `[T]) <= `d[u, x0]_rmove
have TLN : T <= n.+1 by rewrite ltnW.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 TLN : T <= n.+1
535 536
apply : leq_trans (gpath_cut TLN gHux0).53d psi (s2f (n:=n.+1 ) E `&` `[T]) <=
`d[`cut [ TLN, u], `cut [ TLN, x0]]_(move (q:=4 )
(rrel (n:=4 )))
536
rewrite -(@isOE n.+1 T) // -s2fI s2f_cut.53d psi (s2f (n:=T) [set i | `cut [ TLN, u] i == p0]) <=
`d[`cut [ TLN, u], `cut [ TLN, x0]]_(move (q:=4 )
(rrel (n:=4 )))
536
have /peg4comp2[pp2 [pp3 [[H1 H2 H3] [H4 H5] H6]]] := x0sTD0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 53e 4ec 4ed 4ee H3 : pp3 != x0s T
4f0 H5 : pp2 != x0s T
H6 : forall p : peg 4 ,
[\/ p = x0s T, p = p0, p = pp2 | p = pp3]
546 536
have cH1 : codom (ccut TLN x0) \subset [:: pp2; pp3].54a codom `cut [ TLN, x0] \subset [:: pp2; pp3]
apply /subsetP=> i /codomP [j]; rewrite !inE !ffunE => ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 53e 4ec 4ed 4ee 54b 4f0 54c 54d 1c0 j : ordinal_finType T
(x0 (widen_ord (m:=n.+1 ) TLN j) == pp2)
|| (x0 (widen_ord (m:=n.+1 ) TLN j) == pp3)
552
case : (H6 (x0 (widen_ord TLN j))) => [/eqP|/eqP|->|->]; last 2 first .
- 55e
by rewrite eqxx.
- 568
by rewrite eqxx orbT.
- 56d
by rewrite (negPf (move_on_toplDr x0Mx0s x0TDx0sT _)) //= // ltnW.
by rewrite -x0T0 (negPf (move_on_toplDl x0Mx0s x0TDx0sT _)) /=.
by apply : IH cH1.
have [KLT|TLK] := leqP (delta K) T; last first .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 TLK : T < ΞK
157
have K_gt0 : 0 < K by case : (K) TLK.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e K_gt0 : 0 < K
157 57f
have TLN : T < N by apply : leq_trans KTE; rewrite -addn1 leq_add2l.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 TLN : T < N
157 57f
(* This is 3. 5 *)
have psiDN : psi (s2f E) - psi (s2f (E :\ N)) <= 2 ^ K.-1 .58b psi (s2f (n:=n.+1 ) E) - psi (s2f (n:=n.+1 ) (E :\ N)) <=
2 ^ K.-1
rewrite s2fD1.58b psi (s2f (n:=n.+1 ) E) - psi (s2f (n:=n.+1 ) E `\ N) <=
2 ^ K.-1
591
apply : psi_delta => //; last by rewrite (mem_s2f _ N).58b #|` s2f (n:=n.+1 ) E `\` `[ΞK]| <= K
591
rewrite -s2fD_isO card_s2f.58b #|E :\: isO n.+1 (ΞK)| <= K
591
apply : subset_leq_card.58b E :\: isO n.+1 (ΞK) \subset E''
591
apply /subsetP=> i; rewrite !inE -leqNgt.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 171
(ΞK <= i) && (u i == p0) -> (u i == p0) && (T < i)
591
case : (_ == _); rewrite /= !(andbT, andbF) // => KLi.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 171 KLi : ΞK <= i
T < i
591
by apply : leq_trans KLi.
have gH5 : size (z0s :: z0sa) = `d[z0, v]_rmove by have := gpath_dist gHz0v.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 594 gH5 : size (z0s :: z0sa) = `d[z0, v]_rmove
157 57f
rewrite duvE1.5b6 psi (s2f (n:=n.+1 ) E) <=
`d[u, z0]_rmove + `d[z0, v]_rmove
57f
apply : leq_trans (leq_add duz0_leq (leqnn _)).5b6 psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) (E :\ N)) + `d[z0, v]_rmove
57f
rewrite -leq_subLR; apply : leq_trans psiDN _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7
2 ^ K.-1 <= `d[z0, v]_rmove
57f
rewrite dz0vE -[_ ^ _]prednK ?expn_gt0 // -add1n.5c3 1 + (2 ^ K.-1 ).-1 <=
`d[z0, z2]_rmove + `d[z2, v]_rmove
57f
apply : leq_add.
rewrite gdist_gt0.
by apply /eqP => /ffunP/(_ N) /eqP; rewrite z0N0 z2N2 eq_sym (negPf np2Dp0).
pose P := [set ~ np3].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd
5cf 57f
have aH : all (cvalid (E'' :\ N) P) (z2 :: z2a).5da all (cvalid (n:=n.+1 ) (E'' :\ N) (k:=4 ) P) (z2 :: z2a)
apply /allP => c cIg; apply /cvalidP => /= i iIE''.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 20a cIg : c \in z2 :: z2a
20c iIE'' : i \in E'' :\ N
20e 5df
rewrite !inE; apply : memE''; last first .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 20a 5e7 20c 5e8
i \in E''
by move : iIE''; rewrite inE => /andP[].
by rewrite gE' z0sz0saE cat_rcons inE !mem_cat cIg !orbT.
have p0Isp : p0 \in P by rewrite !inE eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228
5cf 57f
have F pg1 pg2 : pg1 \in P -> pg2 \in P -> rrel pg1 pg2 ->
rrel (enum_rank_in p0Isp pg1) (enum_rank_in p0Isp pg2).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 22d
22e
rewrite !inE /rrel /= => pg1Dp3 pg2Dpg3 pg1Dpg2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 22d 237 238 239
23a 5ff
apply : contra_neq pg1Dpg2 => /enum_rank_in_inj.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 22d 237 238
23f 5ff
by rewrite !inE; apply .
case : (@peg4comp3 (z2p N) np2 np3) => // [||p1 [[p1Dnp3 p1Dnp2 p1Dz] Hz]].
- 60e
move : TLN; rewrite Tmax ltnNge.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 5b7 1fd 5e2 228 232
~~ (N <= \max_(i in E') i) -> z2p N != np3
611
apply : contra => /eqP z2pNE; apply : leq_bigmax_cond.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 5b7 1fd 5e2 228 232 z2pNE : z2p N = np3
N \in E'
611
rewrite inE NiE andbT inE; apply /existsP; exists z2p .624 (z2p \in u :: g) && (z2p N == np3)
611
rewrite z2pNE eqxx andbT gE' /z0 z0sz0saE.624 z2p
\in u
:: z0sb ++
rcons (behead (rcons z2b z2p)) z2 ++ z2a
611
case : (z2b) z0Ez2p => [<-//=|zz ll _ /=].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 5b7 1fd 5e2 228 232 625
z0 \in u :: z0sb ++ z2 :: z2a
by rewrite -cat_cons -/z0 mem_cat (mem_last u z0sb).
by rewrite !(inE, mem_cat, mem_rcons, eqxx, orbT).
- 63c
by rewrite eq_sym.
apply : leq_trans (gpath_cset2 F aH gHz2v).615 (2 ^ K.-1 ).-1 <=
`d[cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 ) (sp:=P) (p0:=p0)
p0Isp z2, cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 )
(sp:=P) (p0:=p0) p0Isp v]_(move
(q:=#|P|)
(rrel
(n:=#|[eta P]|)))
57f
have -> : cset2 (E'' :\ N) p0Isp z2 = `c[enum_rank_in p0Isp p1].615 cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 ) (sp:=P) (p0:=p0)
p0Isp z2 =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p1]
apply /ffunP=> i.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 232 616 617 618 619 61a i : ordinal_finType #|E'' :\ N|
cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 ) (sp:=P) (p0:=p0)
p0Isp z2 i =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p1] i
64b
rewrite !ffunE; congr (enum_rank_in _ _).651 z2 (enum_val i) = p1
64b
case : (Hz (z2 (enum_val i))) => // /eqP; rewrite -[_ == _]negbK; case /negP.651 z2 (enum_val i) != z2p N
- 659
by rewrite (negPf ( move_on_toprDl z2pMz2 z2pNDz2N _)) // -ltnS.
- 663
rewrite -z2N2 (negPf (move_on_toprDr z2pMz2 z2pNDz2N _)) //.
have := enum_valP i; rewrite /= !inE => /andP[/eqP/val_eqP/=].651 enum_val i != n ->
(u (enum_val i) == p0) && (T < enum_val i) ->
enum_val i < n
665
have := ltn_ord (enum_val i); rewrite leq_eqVlt /= eqSS ltnS.651 (enum_val i == n) || (enum_val i < n) ->
enum_val i != n ->
(u (enum_val i) == p0) && (T < enum_val i) ->
enum_val i < n
665
by case : ltngtP.
apply : memE''; first by rewrite inE z2Ig orbT.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 232 616 617 618 619 61a 652
enum_val i \in E''
64b
by have := enum_valP i; rewrite inE => /andP[].615 (2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p1], cset2 (n:=n.+1 ) (E'' :\ N)
(k:=4 ) (sp:=P) (p0:=p0)
p0Isp v]_(move (q:=#|P|)
(rrel
(n:=#|[eta P]|)))
57f
have -> : cset2 (E'' :\ N) p0Isp v = `c[enum_rank_in p0Isp np2].615 cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 ) (sp:=P) (p0:=p0)
p0Isp v =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2]
apply /ffunP=> i.651 cset2 (n:=n.+1 ) (E'' :\ N) (k:=4 ) (sp:=P) (p0:=p0)
p0Isp v i =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2] i
683
rewrite !ffunE; congr (enum_rank_in _ _).
have := subsetP cH (v (enum_val i)); rewrite !inE codom_f => /(_ isT).
case /orP=> /eqP //.
suff /eqP : v (enum_val i) != np3 by [].651 v (enum_val i) != np3
683
apply : memE''; first by rewrite inE vIg orbT.
by have := enum_valP i; rewrite inE => /andP[].615 (2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p1], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=P) p0Isp
np2]]_(move (q:=#|P|)
(rrel
(n:=#|[eta P]|)))
57f
have : (enum_rank_in p0Isp p1) != (enum_rank_in p0Isp np2).615 enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2
rewrite eq_sym; apply /eqP => /enum_rank_in_inj.615 (np2 \in P -> p1 \in P -> np2 = p1) -> False
6a1
rewrite !inE eq_sym np3Dp2 p1Dnp3 => /(_ isT isT) H.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 232 616 617 618 619 61a H : np2 = p1
214 6a1
by case /eqP: p1Dnp2.615 enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp p1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=P)
p0Isp np2 ->
(2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=P) p0Isp p1], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=P) p0Isp
np2]]_(move (q:=#|P|)
(rrel
(n:=#|[eta P]|)))
57f
have U : #|P| = 3 .
have := cardsC [set np3]; rewrite -/P.
by rewrite cards1 add1n card_ord => [] [].
move : (enum_rank_in p0Isp p1) (enum_rank_in p0Isp np2).6b6 forall
enum_rank_in
enum_rank_in0 : ordinal_subType #|[eta P]|,
enum_rank_in != enum_rank_in0 ->
(2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in], `c[enum_rank_in0]]_(move
(q:=#|P|)
(rrel
(n:=#|[eta P]|)))
57f
rewrite U => u1 v1 u1Dv1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 57e 587 58c 5b7 1fd 5e2 228 232 616 617 618 619 61a 29e 2ae 2af
(2 ^ K.-1 ).-1 <=
`d[`c[u1], `c[v1]]_(move (q:=3 ) (rrel (n:=3 )))
57f
rewrite gdist_rhanoi3p (negPf u1Dv1) muln1 /K.6c4 (2 ^ #|E''|.-1 ).-1 <= (2 ^ #|E'' :\ N|).-1
57f
by rewrite (cardsD1 N) inE NiE TLN.
pose s := β((T + K).+1 ).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 s := β(T + K).+1 : nat
157
(* This is 3.7 *)
have psiDN : psi (s2f E) - psi (s2f (E :\ N)) <= 2 ^ s.-1 .6d0 psi (s2f (n:=n.+1 ) E) - psi (s2f (n:=n.+1 ) (E :\ N)) <=
2 ^ s.-1
rewrite s2fD1.6d0 psi (s2f (n:=n.+1 ) E) - psi (s2f (n:=n.+1 ) E `\ N) <=
2 ^ s.-1
6d6
apply : psi_delta; last by rewrite mem_s2f.6d0 #|` s2f (n:=n.+1 ) E `\` `[Ξs]| <= s
6d6
rewrite -s2fD_isO // card_s2f.6d0 #|E :\: isO n.+1 (Ξs)| <= s
6d6
set tS1 := isO _ _; pose tS2 := isO n.+1 T.+1 .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 tS1 := isO n.+1 (Ξs) : {set ordinal_finType n.+1 }
tS2 := isO n.+1 T.+1 : {set ordinal_finType n.+1 }
#|E :\: tS1| <= s
6d6
apply : leq_trans (_ : #| E'' :|: (tS2 :\: tS1) | <= s).6e9 #|E :\: tS1| <= #|E'' :|: tS2 :\: tS1|
apply /subset_leq_card/subsetP => i.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6ea 6eb 171
i \in E :\: tS1 -> i \in E'' :|: tS2 :\: tS1
6f1
by rewrite !inE ltnS => /andP[-> ->]; case : (leqP i T).
apply : leq_trans (_ : #| E''| + #| tS2 :\: tS1 | <= s).6e9 #|E'' :|: tS2 :\: tS1| <= #|E''| + #|tS2 :\: tS1|
by rewrite cardsU leq_subr.
rewrite -/K.6e9 K + #|tS2 :\: tS1| <= s
6d6
case : (leqP T.+1 (delta s)) => [TLd|dLT].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6ea 6eb TLd : T < Ξs
709
rewrite (_ : _ :\: _ = set0) ?cards0 ?addn0 .
apply : leq_trans (_ : β T <= _); first by rewrite root_delta_le.
by apply : troot_le; rewrite -addnS leq_addr.
apply /setP=> i; rewrite !inE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6ea 6eb 70e 171
~~ (i < Ξs) && (i < T.+1 ) = false
70f
case : leqP => //= H.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6ea 6eb 70e 171 H : Ξs <= i
(i < T.+1 ) = false
70f
by rewrite ltnS leqNgt (leq_trans TLd).
rewrite -card_s2f.711 K + #|` s2f (n:=n.+1 ) (tS2 :\: tS1)| <= s
6d6
rewrite (_ : s2f (tS2 :\: tS1) = sint (delta s) T.+1 ).711 K + #|` sint (Ξs) T.+1 | <= s
rewrite card_sint //.711 K + (T.+1 - Ξs) <= s
737
rewrite -(@leq_add2r (delta s)) -addnA subnK; last by rewrite ltnW.711 K + T.+1 <= s + Ξs
737
rewrite [s + _]addnC -ltnS -!addnS -deltaS !addnS.711 (K + T).+1 < Ξs.+1
737
by rewrite -root_delta_lt [K + _]addnC -/s.
by rewrite s2fD_isO // isOE // -sint_split.
(* This is 3.8 *)
have duz0_leq2 : psi (s2f E) - 2 ^ s.-1 <= `d[u, z0]_rmove.6d8 psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 <= `d[u, z0]_rmove
by apply : leq_trans duz0_leq; rewrite leq_subCl.
have [|K_gt0] := leqP K 0 .752 K <= 0 -> psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite leqn0 => /eqP KE0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 KE0 : K = 0
157 75b
have TE : T = N.
apply /val_inj/eqP; rewrite eqn_leq [T <= _](ltn_ord T) /=.
suff : N \notin E'' by rewrite inE NiE -leqNgt.
suff -> : E'' = set0 by rewrite inE.
by apply : cards0_eq.
have x3Ircons : x3 \in rcons (behead (rcons z2b z2p)) z2.769 x3 \in rcons (behead (rcons z2b z2p)) z2
have : x3 \in g by rewrite gE x0sx0saE !(inE, mem_cat, eqxx, orbT).769 x3 \in g -> x3 \in rcons (behead (rcons z2b z2p)) z2
77e
rewrite gE' z0sz0saE !(inE, mem_cat).769 [|| x3 \in z0sb,
x3 \in rcons (behead (rcons z2b z2p)) z2
| x3 \in z2a] ->
x3 \in rcons (behead (rcons z2b z2p)) z2
77e
case /or3P => // [/z0sbP0 | iIz2].769 [predC fun c : configuration 4 n.+1 => c N != p0] x3 ->
x3 \in rcons (behead (rcons z2b z2p)) z2
by rewrite !inE negbK -TE x3T3 (negPf np3Dp0).
have /z2aEp2/eqP : x3 \in z2 :: z2a by rewrite inE iIz2 orbT.790 x3 N == np2 ->
x3 \in rcons (behead (rcons z2b z2p)) z2
77e
by rewrite -TE x3T3 (negPf np3Dp2).
pose c := z2p N.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 c := z2p N : (fun => ordinal_eqType 4 ) N
157 75b
have x0Ez0 : x0 = z0.
move : gE; rewrite gE' => /split_head[|[l5 x0sbE]|[l5 z0sbE]].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0
[/\ z0sb = x0sb, z0s = x0s & z0sa = x0sa] -> x0 = z0
- 7aa
by rewrite /x0 /z0 => [] [->].
- 7b8
have /x0sbP0 : z0s \in x0sb by rewrite x0sbE !(mem_cat, inE, eqxx, orbT).7b0 [predC fun c : configuration 4 n.+1 => c T != p0] z0s ->
x0 = z0
7ba
by rewrite /= negbK TE (negPf z0sND0).
have /z0sbP0 : x0s \in z0sb by rewrite z0sbE !(mem_cat, inE, eqxx, orbT).7b4 [predC fun c : configuration 4 n.+1 => c N != p0] x0s ->
x0 = z0
7a5
by rewrite /= negbK -TE (negPf x0sTD0).
case : (@peg4comp3 p0 np2 np3) => [|||p1 [[p1Dnp3 p1Dnp2 p1Dp0] Hz]];
try by rewrite eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 p1Dp0 : p1 != p0
Hz : forall p : peg 4 ,
[\/ p = p0, p = np2, p = np3 | p = p1]
157 75b
have cDnp2 : c != np2 by rewrite /c.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf cDnp2 : c != np2
157 75b
have /peg4comp2[pp2 [pp3 [[H1 H2 H3] [H4 H5] H6]]] := cDnp2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed H2 : pp3 != np2
H3 : pp3 != c
H4 : pp2 != np2
H5 : pp2 != c
H6 : forall p : peg 4 ,
[\/ p = c, p = np2, p = pp2 | p = pp3]
157 75b
pose a := if (pp2 \in [:: p0 ; np3]) && (pp3 \in [:: p0 ; p1])
then pp2 else pp3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd a := if (pp2 \in [:: p0; np3]) && (pp3 \in [:: p0; p1])
then pp2
else pp3: peg 4
157 75b
pose b := if (pp2 \in [:: p0 ; np3]) && (pp3 \in [:: p0 ; p1])
then pp3 else pp2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 b := if (pp2 \in [:: p0; np3]) && (pp3 \in [:: p0; p1])
then pp3
else pp2: peg 4
157 75b
have [aDc aD2 aDb bDc bDnp2] :
[/\ a != c, a != np2, a != b, b != c & b != np2].7e6 [/\ a != c, a != np2, a != b, b != c & b != np2]
by rewrite /a /b; case : (_ && _); split ; rewrite // eq_sym.
have /andP[aI bI] : (a \in [:: p0; np3]) && (b \in [:: p0; p1]).7ee (a \in [:: p0; np3]) && (b \in [:: p0; p1])
rewrite /a /b !inE;
case : (Hz c) cDnp2 H5 H4 H3 H2 H1 => ->;
rewrite /= ?(eqxx, andbT, andbF, orbT, orbF);
case : (Hz pp2) => ->; rewrite /= ?(eqxx, andbT, andbF, orbT, orbF) ;
case : (Hz pp3) => ->; rewrite /= ?(eqxx, andbT, andbF, orbT,orbF) //;
rewrite ?[_ == p1]eq_sym ?[_ == np2]eq_sym ?[_ == np3]eq_sym;
do 6 (case : eqP; rewrite ?eqxx ?orbT //=).
have Hz1 p : [\/ p = np2, p = c, p = a | p = b].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff p : peg 4
[\/ p = np2, p = c, p = a | p = b]
by rewrite /a /b; case : (_ && _); case : (H6 p);
(exact : Or41 ||exact : Or42 || exact : Or43 || exact : Or44).
pose A := [set i | β[z2] i == a].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c A := [set i | β[z2] i == a] : {set ordinal_finType n}
157 75b
pose B := [set i | β[z2] i == b].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 B := [set i | β[z2] i == b] : {set ordinal_finType n}
157 75b
have z2iD2 i : β[z2] i != np2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 i : ordinal_finType n
β[z2] i != np2
rewrite !ffunE -z2N2.81d z2 (trshift 1 i) != z2 N
820
by apply : move_on_toprDr z2pMz2 _ _ => //=.
have z2iDc i : β[z2] i != c.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 81e
β[z2] i != c
rewrite /c ffunE.82e z2 (trshift 1 i) != z2p N
830
by apply : move_on_toprDl z2pMz2 _ _; rewrite //= ltnW.
have ABE : A :|: B = setT.832 A :|: B = [set : ordinal_finType n]
apply /setP=> i; rewrite !inE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 81e
(β[z2] i == a) || (β[z2] i == b) = true
83f
by case : (Hz1 (β[z2] i)) (z2iD2 i) (z2iDc i) => ->; rewrite eqxx ?orbT .
(* This is 3.9 *)
have psiAB_le :
2 ^ β(T + K + 1 ) + psi `[n] <= (psi (s2f A) + psi (s2f B)).+1 .*2 .841 2 ^ β(T + K + 1 ) + psi `[n] <=
((psi (s2f (n:=n) A) + psi (s2f (n:=n) B)).+1 ).*2
rewrite -leq_double -(leq_add2r 1 ) !doubleS !addSnnS.841 (2 ^ β(T + K + 1 ) + psi `[n]).*2 + 1 <=
((psi (s2f (n:=n) A) + psi (s2f (n:=n) B)).*2 ).*2 + 5
84f
have := @psi_cap_ge (s2f A) (s2f B).841 Ο(#|` s2f (n:=n) A `|` s2f (n:=n) B|.+3 ) <=
((psi (s2f (n:=n) A) + psi (s2f (n:=n) B)).*2 ).*2 + 5 ->
(2 ^ β(T + K + 1 ) + psi `[n]).*2 + 1 <=
((psi (s2f (n:=n) A) + psi (s2f (n:=n) B)).*2 ).*2 + 5
84f
rewrite -s2fU ABE s2f_setT card_sint subn0 => /(leq_trans _)-> //.841 (2 ^ β(T + K + 1 ) + psi `[n]).*2 + 1 <= Ο(n.+3 )
84f
rewrite phi_3_5_4_phi !psi_sintS addn1 ltnS leq_double.841 2 ^ β(T + K + 1 ) + psi `[n] <=
psi `[n] + 2 ^ (βn.+1 ).-1 + 2 ^ (βn.+2 ).-1
84f
rewrite addnC -!addnA leq_add2l !addnA.841 2 ^ β(T + K + 1 ) <= 2 ^ (βn.+1 ).-1 + 2 ^ (βn.+2 ).-1
84f
rewrite KE0 TE addn0 addn1 -leq_double doubleD -!mul2n -!expnS.841 2 ^ (βN.+1 ).+1 <=
2 ^ (βn.+1 ).-1 .+1 + 2 ^ (βn.+2 ).-1 .+1
84f
rewrite ![(troot _).-1 .+1 ]prednK // expnS mul2n -addnn leq_add2l.841 2 ^ βN.+1 <= 2 ^ βn.+2
84f
by rewrite leq_pexp2l // troot_le.
pose xa := if a == p0 then x0 else x3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 xa := if a == p0 then x0 else x3: configuration 4 n.+1
157 75b
have xaIrcons : xa \in z0 :: rcons (behead (rcons z2b z2p)) z2.875 xa \in z0 :: rcons (behead (rcons z2b z2p)) z2
by rewrite /xa; case : (_ == p0); rewrite !inE ?x0Ez0 ?eqxx // x3Ircons orbT.
pose p1a := if a == p0 then p0 else np3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e p1a := if a == p0 then p0 else np3: peg 4
157 75b
pose p2a := if a == p0 then x0s N else x3p N.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 p2a := if a == p0 then x0s N else x3p N: ordinal_finType 4
157 75b
have p1aDp2a : p1a != p2a.
by rewrite /p1a /p2a; case : (a =P p0) => aP0 //; rewrite eq_sym -TE.
have /peg4comp2[p3a [p4a [[p4aDp3a p4aDp2a p4aDp1a] [p3aDp2a p3aDp1a] p1aH]]]
:= p1aDp2a.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 p3a, p4a : peg 4
p4aDp3a : p4a != p3a
p4aDp2a : p4a != p2a
p4aDp1a : p4a != p1a
p3aDp2a : p3a != p2a
p3aDp1a : p3a != p1a
p1aH : forall p : peg 4 ,
[\/ p = p1a, p = p2a, p = p3a | p = p4a]
157 75b
have acodom : codom β[xa] \subset [:: p3a; p4a].89a codom β[xa] \subset [:: p3a; p4a]
apply /subsetP => i /codomP[j ->]; rewrite !inE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 1c0 4ff
(β[xa] j == p3a) || (β[xa] j == p4a)
8a6
case : (p1aH (β[xa] j)) => /eqP H; try by rewrite H ?orbT .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 1c0 4ff H : β[xa] j == p1a
8ae
rewrite -[_ == _]negbK in H; case /negP: H.
rewrite /xa /p1a; case : (_ == p0); rewrite !ffunE -?x0T0 -?x3T3 .8ad x0 (trshift 1 j) != x0 T
by apply : (move_on_toplDl x0Mx0s x0TDx0sT); rewrite TE /=.
apply : (move_on_toprDr x3pMx3 x3pTDx3T).
by rewrite TE /=.
rewrite -[_ == _]negbK in H; case /negP: H.
rewrite /xa /p2a; case : (_ == p0); rewrite !ffunE -?x0T0 -?x3T3 -TE.8ad x0 (trshift 1 j) != x0s T
by apply : (move_on_toplDr x0Mx0s x0TDx0sT); rewrite TE ltnW /=.
apply : (move_on_toprDl x3pMx3 x3pTDx3T).
by rewrite TE /= ltnW.
have psiA_le : psi (s2f A) <= `d[β[xa], β[z2]]_rmove.8a8 psi (s2f (n:=n) A) <= `d[β[xa], β[z2]]_rmove
rewrite gdistC; last by apply /move_sym/rsym.8a8 psi (s2f (n:=n) A) <= `d[β[z2], β[xa]]_rmove
8e6
apply : IH acodom; first by rewrite -ltnS.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1
[/\ p4a != p3a, p4a != a & p3a != a]
8e6
split => //.
move : aI p4aDp1a p4aDp2a; rewrite !inE /p1a /p2a.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89f 8a0 8a1
(a == p0) || (a == np3) ->
p4a != (if a == p0 then p0 else np3) ->
p4a != (if a == p0 then x0s N else x3p N) -> p4a != a
8f7
by case eqP => [-> _|_ /= /eqP-> ].
move : aI p3aDp1a p3aDp2a; rewrite !inE /p1a /p2a.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 8a1
(a == p0) || (a == np3) ->
p3a != (if a == p0 then p0 else np3) ->
p3a != (if a == p0 then x0s N else x3p N) -> p3a != a
8e6
by case eqP => [-> _|_ /= /eqP-> ].
have bcodom : codom β[v] \subset [:: np2; np3].8e8 codom β[v] \subset [:: np2; np3]
apply /subsetP => i; rewrite !inE => /codomP[j ->].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9 1c0 4ff
(β[v] j == np2) || (β[v] j == np3)
90e
rewrite !ffunE.915 (v (trshift 1 j) == np2) || (v (trshift 1 j) == np3)
90e
have /subsetP /(_ (v (trshift 1 j))) := cH.915 (v (trshift 1 j) \in codom v ->
v (trshift 1 j) \in [:: np2; np3]) ->
(v (trshift 1 j) == np2) || (v (trshift 1 j) == np3)
90e
by rewrite !inE; apply ; apply : codom_f.
rewrite duvE1.
have psiB_le : psi (s2f B) <= `d[β[z2], β[v]]_rmove.910 psi (s2f (n:=n) B) <= `d[β[z2], β[v]]_rmove
apply : IH bcodom; first by rewrite -ltnS.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9
[/\ np3 != np2, np3 != b & np2 != b]
929
split => //.
by have := bI; rewrite !inE => /orP[] /eqP->; rewrite // eq_sym.
by have := bI; rewrite !inE => /orP[] /eqP->; rewrite // eq_sym.
have dz0z2_leq : (psi (s2f A)).+1 < `d[z0, z2]_rmove.92b (psi (s2f (n:=n) A)).+1 < `d[z0, z2]_rmove
rewrite (gpath_dist gHz0z2) //.92b (psi (s2f (n:=n) A)).+1 <
size (rcons (behead (rcons z2b z2p)) z2)
943
rewrite [size _](@path_shift _ _ _ 1 _ _ _ (gpath_path gHz0z2)); last first .92b irreflexive (T:=peg 4 ) (rrel (n:=4 ))
by apply : rirr.
rewrite -add2n; apply : leq_add.92b 1 <
size
`dup[ clshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq clshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
pose sx3 := @clshift _ 1 _ x3; pose sz2 := @clshift _ 1 _ z2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9 911 92c sx3 := clshift (q:=4 ) (m:=1 ) (n:=n) x3 : configuration 4 1
sz2 := clshift (q:=4 ) (m:=1 ) (n:=n) z2 : configuration 4 1
958 959
have CD : #|[set i in [:: sx3; sz2]]| = 2 .95f #|[set i in [:: sx3; sz2]]| = 2
rewrite (cardsD1 sx3) (cardsD1 sz2); rewrite !inE !eqxx ?orbT /=.95f 1 +
((sz2 != sx3) && true +
#|[set i in [:: sx3; sz2]] :\ sx3 :\ sz2|) = 2
966
case : eqP => /= sz2Rsx3; last first .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9 911 92c 960 961 sz2Rsx3 : sz2 <> sx3
1 + (1 + #|[set i in [:: sx3; sz2]] :\ sx3 :\ sz2|) =
2
congr (S (S _)); apply : eq_card0 => i; rewrite !inE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9 911 92c 960 961 972 i : finfun_finType (ordinal_finType 1 )
(ordinal_finType 4 )
[&& i != sz2, i != sx3 & (i == sx3) || (i == sz2)] =
false
974
by do 2 case : (_ == _).
have /ffunP/(_ ord0) := sz2Rsx3.976 sz2 ord0 = sx3 ord0 ->
1 + (0 + #|[set i in [:: sx3; sz2]] :\ sx3 :\ sz2|) =
2
966
rewrite !ffunE (_ : tlshift _ _ = (ord_max : 'I_(1 + n))).976 z2 ord_max = x3 ord_max ->
1 + (0 + #|[set i in [:: sx3; sz2]] :\ sx3 :\ sz2|) =
2
move => /eqP.976 z2 ord_max == x3 ord_max ->
1 + (0 + #|[set i in [:: sx3; sz2]] :\ sx3 :\ sz2|) =
2
98a
by rewrite /= z2N2 -[ord_max]TE x3T3 eq_sym (negPf np3Dp2).
by apply /val_eqP/eqP.
rewrite -{1 }CD.968 #|[set i in [:: sx3; sz2]]| <=
size
`dup[ clshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq clshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
959
apply : size_rm_rep_subset => //.968 {subset [set i in [:: sx3; sz2]]
<= [seq clshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]}
move => i; rewrite !inE => /orP[]/eqP->; apply : map_f => //.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 8e9 911 92c 960 961 969 97d
z2 \in rcons (behead (rcons z2b z2p)) z2
99f
by rewrite mem_rcons !inE eqxx.
rewrite !inE negb_or; apply /andP; split ; apply /eqP.968 clshift (q:=4 ) (m:=1 ) (n:=n) z0 <> sx3
move => /ffunP /( _ ord_max) /eqP.968 clshift (q:=4 ) (m:=1 ) (n:=n) z0 ord_max == sx3 ord_max ->
False
9ae
rewrite !ffunE (_ : tlshift _ _ = (ord_max : 'I_(1 + n))) /=.968 z0 ord_max == x3 ord_max -> False
by rewrite [z0 _]z0N0 -[ord_max]TE x3T3 eq_sym (negPf np3Dp0).
by apply /val_eqP.
move => /ffunP /( _ ord_max) /eqP.968 clshift (q:=4 ) (m:=1 ) (n:=n) z0 ord_max == sz2 ord_max ->
False
959
rewrite !ffunE (_ : tlshift _ _ = (ord_max : 'I_(1 + n))) /=.968 z0 ord_max == z2 ord_max -> False
by rewrite [z0 _]z0N0 [z2 _]z2N2 eq_sym (negPf np2Dp0).
by apply /val_eqP.
apply : leq_trans psiA_le _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 911 92c
`d[β[xa], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
943
rewrite /xa; case : (_ == p0).9d3 `d[β[x0], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
rewrite x0Ez0.9d3 `d[β[z0], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
9d9
apply : gdist_path_le.9d3 path rmove β[z0]
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
apply : @path_crshift _ _ 1 _ _ _ (gpath_path gHz0z2).
by rewrite last_rm_rep last_map last_rcons.
move : gHz0z2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 911 92c
gpath rmove z0 z2 (rcons (behead (rcons z2b z2p)) z2) ->
`d[β[x3], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons (behead (rcons z2b z2p)) z2]]
943
case : (in_split x3Ircons) => l1 [l2 rE].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 911 92c l1, l2 : seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ))
rE : rcons (behead (rcons z2b z2p)) z2 =
l1 ++ x3 :: l2
9f1 943
rewrite rE -cat_rcons => /gpath_catr.9f5 gpath rmove (last z0 (rcons l1 x3)) z2 l2 ->
`d[β[x3], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i
| i <- rcons l1 x3 ++ l2]]
943
rewrite map_cat cat_rm_rep size_cat map_rcons !last_rcons => gH3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 762 76a 781 7a0 7a8 616 617 618 7ce 7cf 7d4 4ec 4ed 7d9 7da 7db 7dc 7dd 7e2 7e7 7ef 7f0 7f1 7f2 7f3 7fe 7ff 80c 814 819 823 833 842 852 876 87e 886 88b 893 89b 89c 89d 89e 89f 8a0 8a1 8a9 911 92c 9f6 9f7 gH3 : gpath rmove x3 z2 l2
`d[β[x3], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) z0,
rcons [seq crshift (q:=4 ) (m:=1 ) (n:=n) i | i <- l1]
(crshift (q:=4 ) (m:=1 ) (n:=n) x3)] +
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) x3,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i | i <- l2]]
943
apply : leq_trans (leq_addl _ _).9ff `d[β[x3], β[z2]]_rmove <=
size
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) x3,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i | i <- l2]]
943
apply : gdist_path_le.9ff path rmove β[x3]
`dup[ crshift (q:=4 ) (m:=1 ) (n:=n) x3,
[seq crshift (q:=4 ) (m:=1 ) (n:=n) i | i <- l2]]
apply : @path_crshift _ _ 1 _ _ _ (gpath_path gH3).
rewrite last_rm_rep last_map.9ff β[last x3 l2] = β[z2]
943
suff <- : last x3 (l1 ++ x3 :: l2) = last x3 l2 by rewrite -rE last_rcons.9ff last x3 (l1 ++ x3 :: l2) = last x3 l2
943
by rewrite last_cat.
apply : leq_trans (leq_add duz0_leq2 (leqnn _)).945 psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 + `d[z0, v]_rmove
75b
rewrite dz0vE addnA.945 psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 + `d[z0, z2]_rmove +
`d[z2, v]_rmove
75b
apply : leq_trans (leq_add (leqnn _) (gdist_cunlift _)); last first .945 connect (move (q:=4 ) (rrel (n:=4 ))) z2 v
by have /gpathP[z2Pz2a <- _] := gHz2v; apply /connectP; exists z2a .
apply : leq_trans (leq_add (leq_add (leqnn _) dz0z2_leq) psiB_le).945 psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 +
(psi (s2f (n:=n) A)).+2 + psi (s2f (n:=n) B)
75b
rewrite -addnA addnC -leq_subLR.945 psi (s2f (n:=n.+1 ) E) -
((psi (s2f (n:=n) A)).+2 + psi (s2f (n:=n) B)) <=
psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1
75b
apply : leq_sub2l.945 2 ^ s.-1 <=
(psi (s2f (n:=n) A)).+2 + psi (s2f (n:=n) B)
75b
rewrite !addSn -[(_ + _).+2 ]addn1 -leq_double doubleD.945 (2 ^ s.-1 ).*2 <=
((psi (s2f (n:=n) A) + psi (s2f (n:=n) B)).+1 ).*2 +
1 .*2
75b
apply : leq_trans (leq_add psiAB_le (leqnn _)).945 (2 ^ s.-1 ).*2 <= 2 ^ β(T + K + 1 ) + psi `[n] + 1 .*2
75b
by rewrite /s -mul2n -expnS prednK // addn1 -addnA leq_addr.
have TLN : T < N by apply : leq_trans KTE; rewrite -addn1 leq_add2l.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c
157
have NiE'' : N \in E'' by rewrite inE TLN NiE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c NiE'' : N \in E''
157
pose c : disk _ := z2p N.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c c := z2p N : disk 4 : disk 4
157
case : (@peg4comp3 p0 np2 np3); rewrite // 1 ?eq_sym //.a50 forall x : peg 4 ,
[/\ x != np3, x != np2 & x != p0] /\
(forall p : peg 4 ,
[\/ p = p0, p = np2, p = np3 | p = x]) ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
move => p1 [[p1Dnp3 p1Dnp2 p1Dp0] Hz].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf
157
have cI01 : c \in [:: p0; p1].
rewrite !inE; case : (Hz c) => /eqP => [->//|||->]; rewrite ?orbT //.a59 c == np2 -> (c == p0) || (c == p1)
by rewrite /c -z2N2 (negPf z2pNDz2N).
rewrite /c.a59 z2p N == np3 -> (z2p N == p0) || (z2p N == p1)
a5e
suff /memE''/(_ NiE'')/negPf-> : z2p \in u :: g by [].
rewrite gE' z0sz0saE.
case : (z2b) z0Ez2p => [<- //|zz1 ll1 _].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf
z0
\in u
:: z0sb ++
rcons (behead (rcons [::] z0)) z2 ++ z2a
by rewrite /z0 -cat_cons mem_cat mem_last.
by rewrite /= !(inE, mem_cat, mem_rcons, eqxx, orbT).
pose d : disk _ := x3p T.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 d := x3p T : disk 4 : disk 4
157
have dD3 : d != np3 by rewrite /d -x3T3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c dD3 : d != np3
157
pose a : disk 4 := if d == np2 then c else np2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a := (if d == np2 then c else np2) : disk 4 : disk 4
157
pose b : disk 4 := if d == np2 then if c == p0 then p1 else p0
else if d == p0 then p1 else p0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 b := (if d == np2
then if c == p0 then p1 else p0
else if d == p0 then p1 else p0)
: disk 4 : disk 4
157
have aI2c : a \in [:: np2; c].
by rewrite /a; case : (_ == _); rewrite !(inE, eqxx, orbT).
have bI01 : b \in [:: p0; p1].
by rewrite /b; do 2 case : (_ == _); rewrite !(inE, eqxx, orbT).
have dDa : d != a.
rewrite /a; case : (d =P np2) => [->|/eqP//].
by move : cI01; rewrite !inE => /orP[] /eqP-> //; rewrite eq_sym.
have dDb : d != b.
rewrite /b; case : (d =P np2) => [->|_].ab8 np2 != (if c == p0 then p1 else p0)
by case : (_ == p0); rewrite // eq_sym.
by case : (d =P p0) => [->|/eqP//]; rewrite eq_sym.
have bD3 : b != np3.
by move : bI01; rewrite !inE => /orP[] /eqP-> ;rewrite // eq_sym.
have bDa : b != a.
rewrite /a /b; case : (_ =P p0) => [->|/eqP cDp0].adc (if d == np2 then p1 else if d == p0 then p1 else p0)
!= (if d == np2 then p0 else np2)
case : (_ == np2) => [//|].adc (if d == p0 then p1 else p0) != np2
aed
by case : (_ == p0); rewrite // eq_sym.
case : (_ == np2) => [//|]; first by rewrite eq_sym.
by case : (_ == p0); rewrite // eq_sym.
have aD3 : a != np3.
rewrite /a; case : (_ == np2); last by rewrite eq_sym.
by move : cI01; rewrite !inE => /orP[] /eqP->; rewrite // eq_sym.
have Hza i : [\/ i = a, i = b, i = np3 | i = d].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 i : disk 4
[\/ i = a, i = b, i = np3 | i = d]
case : (Hz i) => ->.b11 [\/ p0 = a, p0 = b, p0 = np3 | p0 = d]
- b19
rewrite /a /b; do 2 (case : eqP => [->|_] //).b11 [\/ p0 = p0, p0 = p1, p0 = np3 | p0 = np2]
- b25
by apply : Or41.
- b31
by apply : Or42.
- b36
by apply : Or44.
by apply : Or42.
- b3e
rewrite /a /b; do 2 (case : eqP => [->|_] //).b11 [\/ np2 = p0, np2 = p1, np2 = np3 | np2 = np2]
- b43
by apply : Or44.
- b4f
by apply : Or44.
- b54
by apply : Or41.
by apply : Or41.
- b5c
by apply : Or43.
rewrite /a /b; case : eqP => [->|/eqP dD2]; case : eqP => [->|/eqP cD0].b11 [\/ p1 = p0, p1 = p1, p1 = np3 | p1 = np2]
- b64
by apply : Or42.
- b76
move : cI01 cD0; rewrite !inE => /orP[]/eqP->; first by rewrite eqxx.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b12
p1 != p0 -> [\/ p1 = p1, p1 = p0, p1 = np3 | p1 = np2]
b78
by move => _; apply : Or41.
- b80
by apply : Or42.
case : (Hz d) dD2 cD0 dD3 => ->; rewrite ?eqxx //.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a96 a9b aa3 aae ab9 ac8 add ae8 b06 b12
p1 != np2 ->
p1 != p0 ->
p1 != np3 ->
[\/ p1 = np2, p1 = p0, p1 = np3 | p1 = p1]
b14
by move => *; apply : Or44.
move : (gE); rewrite gE' z0sz0saE x0sx0saE.b16 z0sb ++ rcons (behead (rcons z2b z2p)) z2 ++ z2a =
x0sb ++
(x3, x3b, x3a).1 .2 ++
(x3, x3b, x3a).1 .1 :: (x3, x3b, x3a).2 ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
have tln : T <= n.+1 by apply : ltnW.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 tln : T <= n.+1
b92
rewrite !cat_rcons !catA => /split_tail[[lE z2Ex3 _]|[zz x3aE]|[zz z2aE]];
last 1 first .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 zz : seq
(finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ))
z2aE : z2a =
zz ++ (x3, x3b, x3a).1 .1 :: (x3, x3b, x3a).2
157
- b99
move : (gHz2v); rewrite z2aE -cat_rcons => /gpath_catl.b9b gpath rmove z2 (last z2 (rcons zz (x3, x3b, x3a).1 .1 ))
(rcons zz (x3, x3b, x3a).1 .1 ) ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
b9e
rewrite last_rcons => gHz2x3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d gHz2x3 : gpath rmove z2 (x3, x3b, x3a).1 .1
(rcons zz (x3, x3b, x3a).1 .1 )
157 b9e
move : (gHz2v); rewrite z2aE -cat_rcons => /gpath_catr.bae gpath rmove (last z2 (rcons zz (x3, x3b, x3a).1 .1 )) v
(x3, x3b, x3a).2 ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
b9e
rewrite last_rcons => gHx3v1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf gHx3v1 : gpath rmove (x3, x3b, x3a).1 .1 v
(x3, x3b, x3a).2
157 b9e
move : (gHz2v); rewrite z2aE -cat_rcons => /gdist_cat.bb7 `d[z2, v]_rmove =
`d[z2, last z2 (rcons zz (x3, x3b, x3a).1 .1 )]_rmove +
`d[last z2 (rcons zz (x3, x3b, x3a).1 .1 ), v]_rmove ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
b9e
rewrite last_rcons => dz2vE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 dz2vE : `d[z2, v]_rmove =
`d[z2, (x3, x3b, x3a).1 .1 ]_rmove +
`d[(x3, x3b, x3a).1 .1 , v]_rmove
157 b9e
pose A := [set i | ccut tln x3 i == a].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 A := [set i | `cut [ tln, x3] i == a] : {set ordinal_finType T}
157 b9e
pose B := [set i | ccut tln x3 i == b].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 B := [set i | `cut [ tln, x3] i == b] : {set ordinal_finType T}
157 b9e
have AIB : A :&: B = set0.
apply /setP => i; rewrite !inE !ffunE /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb i : ordinal_finType T
(x3 (widen_ord (m:=n.+1 ) tln i) == a) &&
(x3 (widen_ord (m:=n.+1 ) tln i) == b) = false
bd0
case : eqP => [->|] //=.
by rewrite eq_sym (negPf bDa).
have AUB : A :|: B = setT.bd2 A :|: B = [set : ordinal_finType T]
apply /setP => i; rewrite !inE !ffunE.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 bd8
(x3 (widen_ord (m:=n.+1 ) tln i) == a)
|| (x3 (widen_ord (m:=n.+1 ) tln i) == b) = true
be5
have : ccut tln x3 i != np3.bec `cut [ tln, x3] i != np3
rewrite ffunE -x3T3.bec x3 (widen_ord (m:=n.+1 ) tln i) != (x3, x3b, x3a).1 .1 T
bf2
by apply : (move_on_toprDr x3pMx3) => /=.
have : ccut tln x3 i != d.
rewrite ffunE /d.bec x3 (widen_ord (m:=n.+1 ) tln i) != x3p T
c00
by apply : (move_on_toprDl x3pMx3) => //; rewrite ltnW /=.
by case : (Hza (ccut tln x3 i)); rewrite !ffunE => ->; rewrite ?(eqxx, orbT).
have dz2x3_leq : psi (s2f A) <= `d[z2, x3]_rmove.be7 psi (s2f (n:=T) A) <= `d[z2, x3]_rmove
rewrite gdistC; last by apply /move_sym/rsym.be7 psi (s2f (n:=T) A) <= `d[x3, z2]_rmove
c11
have cDnp2 : c != np2 by rewrite /c.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 7d4
c18 c11
have /peg4comp2[pp1 [pp2 [[H1 H2 H3] [H4 H5] H6]]] := cDnp2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 7d4 pp1, pp2 : peg 4
H1 : pp2 != pp1
H2 : pp2 != np2
H3 : pp2 != c
H4 : pp1 != np2
H5 : pp1 != c
H6 : forall p : peg 4 ,
[\/ p = c, p = np2, p = pp1 | p = pp2]
c18 c11
have cH1 : codom (ccut tln z2) \subset [:: pp1; pp2].c20 codom `cut [ tln, z2] \subset [:: pp1; pp2]
apply /subsetP=> i /codomP[j]; rewrite !ffunE !inE => ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 7d4 c21 c22 c23 c24 c25 c26 c27 1c0 55b
(z2 (widen_ord (m:=n.+1 ) tln j) == pp1)
|| (z2 (widen_ord (m:=n.+1 ) tln j) == pp2)
c2c
case : (H6 (z2 (widen_ord tln j))) => /eqP; try by move ->; rewrite ?orbT .c33 z2 (widen_ord (m:=n.+1 ) tln j) == c ->
(z2 (widen_ord (m:=n.+1 ) tln j) == pp1)
|| (z2 (widen_ord (m:=n.+1 ) tln j) == pp2)
rewrite /c -[_ == z2p _]negbK => /negP[].c33 z2 (widen_ord (m:=n.+1 ) tln j) != z2p N
c39
apply : (move_on_toprDl z2pMz2) => //=.
by apply /ltnW/(leq_trans (ltn_ord _))/ltnW.
rewrite -z2N2 -[_ == z2 _]negbK => /negP[].c33 z2 (widen_ord (m:=n.+1 ) tln j) != z2 N
c2c
apply : (move_on_toprDr z2pMz2) => //=.
by apply : (leq_trans (ltn_ord _)) => /=; apply : ltnW.
apply : leq_trans (_ : `d[ccut tln x3, ccut tln z2]_rmove <= _).c2e psi (s2f (n:=T) A) <=
`d[`cut [ tln, x3], `cut [ tln, z2]]_rmove
apply : IH cH1; first by apply /(leq_trans TLN _)/ltnW.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 7d4 c21 c22 c23 c24 c25 c26 c27
[/\ pp2 != pp1, pp2 != a & pp1 != a]
c56
split => //.
move : aI2c; rewrite !inE.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 7d4 c21 c22 c23 c24 c25 c26 c27
(a == np2) || (a == c) -> pp2 != a
c62
by case : (H6 a) => -> //; rewrite (negPf H2) (negPf H3).
move : aI2c; rewrite !inE.c68 (a == np2) || (a == c) -> pp1 != a
c56
case : (H6 a) => -> //; first by rewrite (negPf H4) (negPf H5).c68 (pp2 == np2) || (pp2 == c) -> pp1 != pp2
c56
by move => *; rewrite eq_sym.
apply : gpath_cut (gpathC _ gHz2x3).c2e symmetric
(T:=finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 )) rmove
c11
by apply /move_sym/rsym.
have dx3v_leq : psi (s2f B) <= `d[x3, v]_rmove.c13 psi (s2f (n:=T) B) <= `d[x3, v]_rmove
have cH1 : codom (ccut tln v) \subset [:: np2; np3].c13 codom `cut [ tln, v] \subset [:: np2; np3]
by apply : codom_cut.
apply : leq_trans (_ : `d[ccut tln x3, ccut tln v]_rmove <= _).c8d psi (s2f (n:=T) B) <=
`d[`cut [ tln, x3], `cut [ tln, v]]_rmove
apply : IH cH1; first by apply : leq_trans TLN _; apply : ltnW.5 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 c14
931 c96
by have := bI01; rewrite !inE => /orP[] /eqP->; split ; rewrite // eq_sym.
by apply : gpath_cut gHx3v.
rewrite duvE1.
apply : leq_trans (leq_add duz0_leq2 (leqnn _)).
rewrite (gpath_dist gHz0v) z0sz0saE size_cat size_rcons addnCA addnA addSnnS.c85 psi (s2f (n:=n.+1 ) E) <=
size (behead (rcons z2b z2p)) +
(psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 ).+1 + size z2a
b9e
apply : leq_trans (leq_add (leq_addl _ _) (leqnn _)).c85 psi (s2f (n:=n.+1 ) E) <=
(psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 ).+1 + size z2a
b9e
rewrite -(gpath_dist gHz2v) dz2vE.c85 psi (s2f (n:=n.+1 ) E) <=
(psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 ).+1 +
(`d[z2, (x3, x3b, x3a).1 .1 ]_rmove +
`d[(x3, x3b, x3a).1 .1 , v]_rmove)
b9e
apply : leq_trans (leq_add (leqnn _) (leq_add dz2x3_leq dx3v_leq)).c85 psi (s2f (n:=n.+1 ) E) <=
(psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 ).+1 +
(psi (s2f (n:=T) A) + psi (s2f (n:=T) B))
b9e
rewrite addSnnS.c85 psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) E) - 2 ^ s.-1 +
(psi (s2f (n:=T) A) + psi (s2f (n:=T) B)).+1
b9e
suff psiAB_le : 2 ^ s <= (psi (s2f A) + psi (s2f B)).+1 .*2 .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c b9d baf bb8 bc1 bc6 bcb bd3 be8 c14 c86 psiAB_le : 2 ^ s <=
((psi (s2f (n:=T) A) + psi (s2f (n:=T) B)).+1 ).*2
cbc
rewrite -leq_double doubleD doubleB.cc0 (psi (s2f (n:=n.+1 ) E)).*2 <=
(psi (s2f (n:=n.+1 ) E)).*2 - (2 ^ s.-1 ).*2 +
((psi (s2f (n:=T) A) + psi (s2f (n:=T) B)).+1 ).*2
cc2
apply : leq_trans (leq_add (leqnn _) psiAB_le).cc0 (psi (s2f (n:=n.+1 ) E)).*2 <=
(psi (s2f (n:=n.+1 ) E)).*2 - (2 ^ s.-1 ).*2 + 2 ^ s
cc2
rewrite addnC -leq_subLR leq_sub2l //.cc0 (2 ^ s.-1 ).*2 <= 2 ^ s
cc2
by rewrite -mul2n -expnS prednK.
rewrite -leq_double -mul2n -expnS -ltnS !doubleS -[_.+4 ]addn1 !addSnnS.c85 2 ^ s.+1 <
((psi (s2f (n:=T) A) + psi (s2f (n:=T) B)).*2 ).*2 + 5
b9e
apply : leq_trans _ (psi_cap_ge _ _).c85 2 ^ s.+1 < Ο(#|` s2f (n:=T) A `|` s2f (n:=T) B|.+3 )
b9e
rewrite -s2fU AUB s2f_setT -(@isOE n.+1 ) //.c85 2 ^ s.+1 < Ο(#|` s2f (n:=n.+1 ) (isO n.+1 T)|.+3 )
b9e
rewrite card_s2f card_isO (minn_idPr _) //.c85 2 ^ s.+1 < Ο(T.+3 )
b9e
rewrite phi_3_5_4_phi ltnS expnS mul2n leq_double.c85 2 ^ s <= psi `[T.+2 ]
b9e
apply : leq_trans (psi_SS_le _).c85 2 ^ s <= 2 ^ (βT).+1
b9e
rewrite leq_exp2l // -[s]prednK // ltnS root_delta_le.
have ->: delta s.-1 = delta s - s
by rewrite -{2 }[s]prednK // deltaS prednK // addnK.
have -> : T = (T + K).+1 - K.+1 :> nat by rewrite subSS addnK.c85 Ξs - s <= (T + K).+1 - K.+1
b9e
apply : leq_sub; first by apply : delta_root_le.
by rewrite root_delta_le deltaS -addnS leq_add2r.
- cfd
have z2pEx3 : z2p = x3p.
rewrite /x3p /x0 -last_cat -lE.ba0 z2p = last u (z0sb ++ behead (rcons z2b z2p))
d05
case : (z2b) z0Ez2p => [<-//|zz ll _] /=; first by rewrite /z0 cats0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 ba1 ba2 4a0 4a1
z2p = last u (z0sb ++ rcons ll z2p)
d05
by rewrite last_cat last_rcons.
have /(move_disk1 z2pMz2 z2pNDz2N)/eqP : N != T by rewrite neq_ltn TLN orbT.d07 z2p T == z2 T ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
cff
by rewrite z2pEx3 z2Ex3 (negPf x3pTDx3T).
(* x0 is before z0 *)
move : (gE').ba4 g = z0sb ++ z0s :: z0sa ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
rewrite gE => /split_head[ [x0sbE x0sEz0s xsaE]
|[zz1 z0sbE] | [zz1 x0sbE]]; first 2 last .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 zz1 : seq
(finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ))
x0sbE : x0sb = z0sb ++ z0s :: zz1
157
- d21
have : z0s \in x0sb by rewrite x0sbE !(mem_cat, inE, eqxx, orbT).d23 z0s \in x0sb ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
d26
move /x0sbP0; rewrite /= negbK => /eqP z0sT0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d25 z0sT0 : z0s T = p0
157 d26
have z0T0 : z0 T = p0.
rewrite -z0sT0; apply : move_disk1 z0Mz0s z0NDz0sN _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d25 d38
N != T
d3d
by rewrite neq_ltn TLN orbT.
have : z0 T != z0 N by apply : move_on_toplDl z0Mz0s _ _.d3f z0 T != z0 N ->
psi (s2f (n:=n.+1 ) E) <= `d[u, v]_rmove
d26
by rewrite z0N0 z0T0 eqxx.
- d4e
case /eqP : x0TDx0sT.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d29 d2a d2b
x0 T = x0s T
d50
rewrite /x0 x0sbE -/z0 x0sEz0s; apply : move_disk1 z0Mz0s z0NDz0sN _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d29 d2a d2b
d45 d50
by rewrite neq_ltn TLN orbT.
pose sd : {set disk n.+1 } := isO n.+1 T.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d2e sd := isO n.+1 T : {set disk n.+1 } : {set disk n.+1 }
157
have card_sdE : #|sd| = T.
by rewrite card_isO /minn ifN // -leqNgt -ltnS ltnW // ltnW.
pose u'' := ccut tln u.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d2e d62 d6a u'' := `cut [ tln, u] : configuration 4 T
157
pose x0'' := ccut tln x0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d2e d62 d6a d72 x0'' := `cut [ tln, x0] : configuration 4 T
157
pose z2'' := ccut tln z2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d2e d62 d6a d72 d77 z2'' := `cut [ tln, z2] : configuration 4 T
157
pose x3'' := ccut tln x3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 a9b aa3 aae ab9 ac8 add ae8 b06 b17 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c x3'' := `cut [ tln, x3] : configuration 4 T
157
clear b bI01 dDb bD3 bDa Hza.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81
157
pose b := if c == p0 then p1 else p0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 b := if c == p0 then p1 else p0: peg 4
157
have np3Dc : np3 != c.
by move : cI01; rewrite !inE => /orP[] /eqP->; rewrite // eq_sym.
have np3Db : np3 != b.
by move : cI01; rewrite /b !inE => /orP[] /eqP->;
rewrite ?(eqxx, negPf p1Dp0) // eq_sym.
have np2Dc : np2 != c.
by move : cI01; rewrite !inE => /orP[] /eqP->; rewrite // eq_sym.
have np2Db : np2 != b.
by move : cI01; rewrite /b !inE => /orP[] /eqP->;
rewrite ?(eqxx, negPf p1Dp0) // eq_sym.
have cDb : c != b.
by move : cI01; rewrite /b !inE => /orP[] /eqP->;
rewrite ?(eqxx, negPf p1Dp0) // eq_sym.
have Hzb i : [\/ i = np3, i = np2, i = c | i = b].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb i : peg 4
[\/ i = np3, i = np2, i = c | i = b]
by move : cI01; rewrite /b !inE => /orP[] /eqP->;
rewrite ?(eqxx, negPf p1Dp0); case : (Hz i) => ->;
(try by apply : Or41); (try by apply : Or42);
(try by apply : Or43); (try by apply : Or44).
have bI01 : b \in [:: p0; p1].
by move : cI01; rewrite /b !inE => /orP[] /eqP->;
rewrite ?(eqxx, negPf p1Dp0) // eq_sym.
pose A : {set disk T} := [set i | z2'' i == np3].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae A := [set i | z2'' i == np3] : {set disk T} : {set disk T}
157
pose B : {set disk n} := [set i | β[z2] i == b].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 B := [set i | β[z2] i == b] : {set disk n} : {set disk n}
157
have cH2 : codom β[z2] \subset [:: np3; b].ddd codom β[z2] \subset [:: np3; b]
apply /subsetP=> i /codomP[j]; rewrite !ffunE !inE => ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde 1c0 4ff
(z2 (trshift 1 j) == np3) || (z2 (trshift 1 j) == b)
de3
case : (Hzb (z2 (trshift 1 j))) => /eqP; try by move ->; rewrite ?orbT .dea z2 (trshift 1 j) == np2 ->
(z2 (trshift 1 j) == np3) || (z2 (trshift 1 j) == b)
rewrite -[_ == np2]negbK -z2N2 => /negP[].dea z2 (trshift 1 j) != z2 N
df0
by apply : (move_on_toprDr z2pMz2) => /=.
rewrite -[_ == c]negbK /c => /negP[].dea z2 (trshift 1 j) != z2p N
de3
by apply : (move_on_toprDl z2pMz2) => //=; apply : ltnW.
have bsI (i : disk n.+1 ) : i \in E'' :\ N -> z2 i = b.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 i : disk n.+1
i \in E'' :\ N -> z2 i = b
rewrite 2 !inE; rewrite -val_eqE /= => /andP[iDn iIE'']; apply /eqP.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e05 iDn : i != n
iIE'' : i \in E''
z2 i == b
e07
have iLn : i < n.
by move : (ltn_ord i); rewrite leq_eqVlt eqSS (negPf iDn).
have /subsetP := cH2.e18 {subset codom β[z2] <= [:: np3; b]} -> z2 i == b
e07
move => /(_ (β[z2] (Ordinal iLn))(codom_f _ _)).e18 β[z2] (Ordinal (n:=n) (m:=i) iLn) \in [:: np3; b] ->
z2 i == b
e07
rewrite !inE !ffunE /= (_ : trshift _ _ = (i : 'I_(1 + n))); last first .e18 trshift 1 (Ordinal (n:=n) (m:=i) iLn) = i
by apply : val_inj.
rewrite (negPf (memE'' _ _ _ _)) //=.
by rewrite gE' z0sz0saE !(inE, mem_cat, mem_rcons, eqxx, orbT).
have dz2''x3''_leq : psi (s2f A) <= `d[z2'', x3'']_rmove.e09 psi (s2f (n:=T) A) <= `d[z2'', x3'']_rmove
pose a1 : peg 4 := x3p T.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a a1 := x3p T : peg 4 : peg 4
e39 e3a
have a1Dnp3 : a1 != np3 by [].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e42 a1Dnp3 : a1 != np3
e39 e3a
have /peg4comp2[pp1 [pp2 [[H1 H2 H3] [H4 H5] H6]]] := a1Dnp3.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e42 e47 c21 c22 H2 : pp2 != np3
H3 : pp2 != a1
H4 : pp1 != np3
H5 : pp1 != a1
H6 : forall p : peg 4 ,
[\/ p = a1, p = np3, p = pp1 | p = pp2]
e39 e3a
have cH3 : codom x3'' \subset [:: pp1; pp2].e4b codom x3'' \subset [:: pp1; pp2]
apply /subsetP=> i /codomP[j]; rewrite !ffunE !inE => ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e42 e47 c21 c22 e4c e4d e4e e4f e50 1c0 55b
(x3 (widen_ord (m:=n.+1 ) tln j) == pp1)
|| (x3 (widen_ord (m:=n.+1 ) tln j) == pp2)
e55
case : (H6 (x3 (widen_ord tln j))) => /eqP; try by move ->; rewrite ?orbT .e5c x3 (widen_ord (m:=n.+1 ) tln j) == a1 ->
(x3 (widen_ord (m:=n.+1 ) tln j) == pp1)
|| (x3 (widen_ord (m:=n.+1 ) tln j) == pp2)
rewrite -[_ == a1]negbK => /negP[].e5c x3 (widen_ord (m:=n.+1 ) tln j) != a1
e62
by apply : (move_on_toprDl x3pMx3) => //=; apply : ltnW.
rewrite -[_ == np3]negbK -x3T3 => /negP[].e5c x3 (widen_ord (m:=n.+1 ) tln j) != (x3, x3b, x3a).1 .1 T
e55
by apply : (move_on_toprDr x3pMx3) => /=.
by apply : IH cH3 => //; apply /(leq_trans TLN)/ltnW.
have du''x0''_leq : psi (s2f E `&` `[T]) <= `d[u'', x0'']_rmove.e3c psi (s2f (n:=n.+1 ) E `&` `[T]) <= `d[u'', x0'']_rmove
have -> : s2f E `&` `[T] = s2f [set i | u'' i == p0].e3c s2f (n:=n.+1 ) E `&` `[T] =
s2f (n:=T) [set i | u'' i == p0]
by rewrite -(@isOE n.+1 ) // -s2fI -s2f_cut.
have /peg4comp2[pp2 [pp3 [[H1 H2 H3] [H4 H5] H6]]] := x0sTD0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d 4ec 4ed 4ee 54b 4f0 54c 54d
e84 e7a
have cH1 : codom x0'' \subset [:: pp2; pp3].e8b codom x0'' \subset [:: pp2; pp3]
apply /subsetP=> i /codomP[j]; rewrite !inE !ffunE => ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d 4ec 4ed 4ee 54b 4f0 54c 54d 1c0 55b
(x0 (widen_ord (m:=n.+1 ) tln j) == pp2)
|| (x0 (widen_ord (m:=n.+1 ) tln j) == pp3)
e90
case : (H6 (x0 (widen_ord tln j))) => /eqP; try by move ->; rewrite ?orbT .e97 x0 (widen_ord (m:=n.+1 ) tln j) == x0s T ->
(x0 (widen_ord (m:=n.+1 ) tln j) == pp2)
|| (x0 (widen_ord (m:=n.+1 ) tln j) == pp3)
rewrite -[_ == x0s T]negbK => /negP[].e97 x0 (widen_ord (m:=n.+1 ) tln j) != x0s T
e9d
by apply : (move_on_toplDr x0Mx0s) => //=; apply : ltnW.
rewrite -[_ == p0]negbK -x0T0 => /negP[].e97 x0 (widen_ord (m:=n.+1 ) tln j) != x0 T
e90
by apply : (move_on_toplDl x0Mx0s) => /=.
by apply : IH cH1=> //; apply /(leq_trans TLN _)/ltnW.
have psiAB_leq : psi `[T + K + 1 ] <= (psi (s2f A) + psi (s2f B)).+1 .*2 .e7c psi `[T + K + 1 ] <=
((psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).+1 ).*2
rewrite -leq_double psi_sint_phi -ltnS prednK ?phi_gt0 //.e7c Ο((T + K + 1 ).+1 ) <=
(((psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).+1 ).*2 ).*2 .+1
eb5
have ->: (T + K + 1 ).+1 = (T + K).-1 .+3 .e7c (T + K + 1 ).+1 = (T + K).-1 .+3
rewrite -{1 }[T + K]prednK ?addn1 ?addnS ?addn_gt0 ?K_gt0 ?orbT //.
have : (T + K).-1 <= #|` (s2f A) `|` (s2f B)|.e7c (T + K).-1 <= #|` s2f (n:=T) A `|` s2f (n:=n) B|
have : (`[T] `|` (s2f (E'' :\ N))) `<=` ((s2f A) `|` (s2f B)).e7c `[T] `|` s2f (n:=n.+1 ) (E'' :\ N)
`<=` s2f (n:=T) A `|` s2f (n:=n) B
apply /fsubsetP => i; rewrite inE mem_sint /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d i : nat_choiceType
(i < T) || (i \in s2f (n:=n.+1 ) (E'' :\ N)) ->
i \in s2f (n:=T) A `|` s2f (n:=n) B
ed2
case /orP => [iLT|iIEN]; last first .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d ed9 iIEN : i \in s2f (n:=n.+1 ) (E'' :\ N)
i \in s2f (n:=T) A `|` s2f (n:=n) B
have iLn : i < n.
move : iIEN; rewrite s2fD !inE s2f1 //= in_fset1.ed8 (i != n) && (i \in s2f (n:=n.+1 ) E'') -> i < n
ee8
case /andP=> iDn /imfsetP[/= j _ iEj].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d ed9 e0f j : 'I_n.+1
iEj : i = j
e15 ee8
by have := ltn_ord j; rewrite -iEj leq_eqVlt eqSS (negPf iDn).
rewrite inE; apply /orP; right .
rewrite (@mem_s2f _ _ (Ordinal iLn)) inE !ffunE; apply /eqP.eea z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) = b
ee1
by apply : bsI; rewrite -mem_s2f.
have iLn : i < n by apply : leq_trans iLT (ltnW _).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d ed9 ee4 e19
ee0 ed2
have /subsetP/(_ (β[z2] (Ordinal iLn))(codom_f _ _)) := cH2.f06 β[z2] (Ordinal (n:=n) (m:=i) iLn) \in [:: np3; b] ->
i \in s2f (n:=T) A `|` s2f (n:=n) B
ed2
rewrite !inE !ffunE /=.f06 (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == np3)
|| (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == b) ->
(i \in s2f (n:=T) A) || (i \in s2f (n:=n) B)
ed2
rewrite (@mem_s2f _ _ (Ordinal iLn)) inE ffunE.f06 (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == np3)
|| (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == b) ->
(i \in s2f (n:=T) A)
|| (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == b)
ed2
rewrite (@mem_s2f _ _ (Ordinal iLT)) inE ffunE.f06 (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == np3)
|| (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == b) ->
(z2
(widen_ord (m:=n.+1 ) tln
(Ordinal (n:=T) (m:=i) iLT)) == np3)
|| (z2 (trshift 1 (Ordinal (n:=n) (m:=i) iLn)) == b)
ed2
rewrite (_ : trshift _ _ = widen_ord tln (Ordinal iLT) :> 'I_(1 + n)) //.f06 trshift 1 (Ordinal (n:=n) (m:=i) iLn) =
widen_ord (m:=n.+1 ) tln (Ordinal (n:=T) (m:=i) iLT)
ed2
by apply : val_inj.
move => /fsubset_leq_card /(leq_trans _)->//.e7c (T + K).-1 <= #|` `[T] `|` s2f (n:=n.+1 ) (E'' :\ N)|
ecb
rewrite -(leq_add2r 0 ) addn0.e7c (T + K).-1 <=
#|` `[T] `|` s2f (n:=n.+1 ) (E'' :\ N)| + 0
ecb
suff {2 }<- : #|` `[T] `&` s2f (n:=n.+1 ) (E'' :\ N)| = 0 .e7c (T + K).-1 <=
#|` `[T] `|` s2f (n:=n.+1 ) (E'' :\ N)| +
#|` `[T] `&` s2f (n:=n.+1 ) (E'' :\ N)|
rewrite cardfsUI card_sint subn0 card_s2f /K (cardsD1 N).e7c (T + ((N \in E'') + #|E'' :\ N|)).-1 <=
T + #|E'' :\ N|
f2a
by rewrite NiE'' addnS.
apply /eqP; rewrite cardfs_eq0; apply /eqP/fsetP => i.ed8 (i \in `[T] `&` s2f (n:=n.+1 ) (E'' :\ N)) =
(i \in fset0)
ecb
rewrite !inE mem_sint; apply /idP => /= /andP[iLT /imfsetP[j /=]].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d ed9 ee4 j : ordinal_choiceType n.+1
j \in E'' :\ N -> i = j -> False
ecb
rewrite !inE => /and3P[_ _ TLj] iEj.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d ed9 ee4 f3c TLj : T < j
ef4 214 ecb
by move : iLT; rewrite ltnNge ltnW // iEj.
rewrite -3 !ltnS => /phi_le/leq_trans-> //.e7c Ο(#|` s2f (n:=T) A `|` s2f (n:=n) B|.+3 ) <=
(((psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).+1 ).*2 ).*2 .+1
eb5
rewrite !doubleS -[_.+4 ]addn1 !addSnnS.e7c Ο(#|` s2f (n:=T) A `|` s2f (n:=n) B|.+3 ) <=
((psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).*2 ).*2 + 5
eb5
by apply : psi_cap_ge.
have duz2_leq : psi (s2f E `&` `[T]) + psi (s2f A) + 2 ^ K.-1 < `d[u,z2]_rmove.eb7 psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) +
2 ^ K.-1 < `d[u, z2]_rmove
have := (gHuv); rewrite gE' z0sz0saE catA => /gpath_catl.eb7 gpath rmove u
(last u (z0sb ++ rcons (behead (rcons z2b z2p)) z2))
(z0sb ++ rcons (behead (rcons z2b z2p)) z2) ->
psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) +
2 ^ K.-1 < `d[u, z2]_rmove
f55
rewrite last_cat last_rcons => gH1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 gH1 : gpath rmove u z2
(z0sb ++ rcons (behead (rcons z2b z2p)) z2)
f54 f55
rewrite (gpath_dist gH1) (size_cut_tuc tln _ (gpath_path gH1)); last first .
by apply : rirr.
rewrite -addnS; apply : leq_add.f60 psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i]
| i <- z0sb ++ rcons (behead (rcons z2b z2p)) z2]]
have := gE'; rewrite z0sz0saE gE x0sx0saE x3aE cat_rcons.f60 x0sb ++
(x3, x3b, x3a).1 .2 ++
(x3, x3b, x3a).1 .1 :: zz ++ z2 :: z2a =
z0sb ++ behead (rcons z2b z2p) ++ z2 :: z2a ->
psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i]
| i <- z0sb ++ rcons (behead (rcons z2b z2p)) z2]]
f6f
rewrite -!cat_cons !catA -rcons_cat => /cat_injr <-.f60 psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i]
| i <- rcons
((x0sb ++ (x3, x3b, x3a).1 .2 ) ++
(x3, x3b, x3a).1 .1 :: zz) z2]]
f6f
rewrite rcons_cat !map_cat !cat_rm_rep !size_cat -addnA.f60 psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i] | i <- x0sb]] +
(size
`dup[ last `cut [ tln, u]
[seq `cut [ tln, i] | i <- x0sb],
[seq `cut [ tln, i] | i <- (x3, x3b, x3a).1 .2 ]] +
size
`dup[ last `cut [ tln, u]
([seq `cut [ tln, i] | i <- x0sb] ++
[seq `cut [ tln, i]
| i <- (x3, x3b, x3a).1 .2 ]),
[seq `cut [ tln, i]
| i <- rcons ((x3, x3b, x3a).1 .1 :: zz) z2]])
f6f
apply : leq_add.f60 psi (s2f (n:=n.+1 ) E `&` `[T]) <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i] | i <- x0sb]]
apply : leq_trans du''x0''_leq _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d eb8 f61
`d[u'', x0'']_rmove <=
size
`dup[ `cut [ tln, u],
[seq `cut [ tln, i] | i <- x0sb]]
f82
apply : gdist_path_le.f88 path rmove u''
`dup[ `cut [ tln, u],
[seq `cut [ tln, i] | i <- x0sb]]
apply : path_cut.f88 path (move (q:=4 ) (rrel (n:=4 ))) u x0sb
f8e
by move : gHuv; rewrite gE => /gpath_catl/gpath_path.
by rewrite last_rm_rep last_map.
apply : leq_trans _ (leq_addl _ _).f60 psi (s2f (n:=T) A) <=
size
`dup[ last `cut [ tln, u]
([seq `cut [ tln, i] | i <- x0sb] ++
[seq `cut [ tln, i]
| i <- (x3, x3b, x3a).1 .2 ]),
[seq `cut [ tln, i]
| i <- rcons ((x3, x3b, x3a).1 .1 :: zz) z2]]
f6f
apply : leq_trans dz2''x3''_leq _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e7d eb8 f61
`d[z2'', x3'']_rmove <=
size
`dup[ last `cut [ tln, u]
([seq `cut [ tln, i] | i <- x0sb] ++
[seq `cut [ tln, i]
| i <- (x3, x3b, x3a).1 .2 ]),
[seq `cut [ tln, i]
| i <- rcons ((x3, x3b, x3a).1 .1 :: zz) z2]]
f6f
rewrite rcons_cons [map _ (_ ::_)]/=.fa2 `d[z2'', x3'']_rmove <=
size
`dup[ last `cut [ tln, u]
([seq `cut [ tln, i] | i <- x0sb] ++
[seq `cut [ tln, i]
| i <- (x3, x3b, x3a).1 .2 ]),
`cut [ tln, x3]
:: [seq `cut [ tln, i] | i <- rcons zz z2]]
f6f
apply : leq_trans (size_rm_rep_cons _ _ _).fa2 `d[z2'', x3'']_rmove <=
size
`dup[ `cut [ tln, x3],
[seq `cut [ tln, i] | i <- rcons zz z2]]
f6f
rewrite gdistC; last by apply /move_sym/rsym.fa2 `d[x3'', z2'']_rmove <=
size
`dup[ `cut [ tln, x3],
[seq `cut [ tln, i] | i <- rcons zz z2]]
f6f
apply : gdist_path_le.fa2 path rmove x3''
`dup[ `cut [ tln, x3],
[seq `cut [ tln, i] | i <- rcons zz z2]]
apply : path_cut.fa2 path (move (q:=4 ) (rrel (n:=4 ))) x3 (rcons zz z2)
fb4
by have := gHx3v; rewrite x3aE -cat_rcons => /gpath_catl/gpath_path.
by rewrite last_rm_rep map_rcons last_rcons.
have := gHuv; rewrite gE' z0sz0saE catA => /gpath_catl.f60 gpath rmove u
(last u (z0sb ++ rcons (behead (rcons z2b z2p)) z2))
(z0sb ++ rcons (behead (rcons z2b z2p)) z2) ->
2 ^ K.-1 <
size
`dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++ rcons (behead (rcons z2b z2p)) z2]]
f55
rewrite last_cat last_rcons => gHuz2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 gH1, gHuz2 : gpath rmove u z2
(z0sb ++ rcons (behead (rcons z2b z2p)) z2)
f71 f55
have Puz2 := path_tuc tln (gpath_path gHuz2).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 Puz2 : path (move (q:=4 ) (rrel (n:=4 )))
`tuc[ tln, u]
`dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p)) z2]]
f71 f55
have oLn : 0 < n.+1 - T by rewrite subn_gt0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce oLn : 0 < n.+1 - T
f71 f55
rewrite (size_cut_tuc oLn _ Puz2) -add1n; last by apply : rirr.fd2 1 + 2 ^ K.-1 <=
size
`dup[ `cut [ oLn, `tuc[ tln, u]],
[seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p))
z2]]]] +
size
`dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p))
z2]]]]
f55
have Puz3 := path_tuc oLn Puz2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 Puz3 : path (move (q:=4 ) (rrel (n:=4 )))
`tuc[ oLn, `tuc[ tln, u]]
`dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead (rcons z2b z2p))
z2]]]]
fd7 f55
apply : leq_add.fdb 0 <
size
`dup[ `cut [ oLn, `tuc[ tln, u]],
[seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p))
z2]]]]
move : gE; rewrite gE'; rewrite z0sz0saE x0sx0saE x3aE -!cat_rcons !catA.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc
(z0sb ++ rcons (behead (rcons z2b z2p)) z2) ++ z2a =
((x0sb ++ rcons (x3, x3b, x3a).1 .2 (x3, x3b, x3a).1 .1 ) ++
rcons zz z2) ++ z2a ->
0 <
size
`dup[ `cut [ oLn, `tuc[ tln, u]],
[seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p))
z2]]]]
fe1
move => /cat_injr ->.fe7 0 <
size
`dup[ `cut [ oLn, `tuc[ tln, u]],
[seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- (x0sb ++
rcons (x3, x3b, x3a).1 .2
(x3, x3b, x3a).1 .1 ) ++
rcons zz z2]]]]
fe1
set cc := rm_rep _ _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc cc := `dup[ `cut [ oLn, `tuc[ tln, u]],
[seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- (x0sb ++
rcons
(x3, x3b, x3a).1 .2
(x3, x3b, x3a).1 .1 ) ++
rcons zz z2]]]] : seq
(finfun_eqType (ordinal_finType 1 )
(ordinal_eqType 4 ))
0 < size cc
fe1
suff : ccut oLn (ctuc tln x3) \in cc by case : cc.ff0 `cut [ oLn, `tuc[ tln, x3]] \in cc
fe1
apply : mem_rm_rep.ff0 `cut [ oLn, `tuc[ tln, x3]]
!= `cut [ oLn, `tuc[ tln, u]]
apply /eqP=> /ffunP/(_ ord0); rewrite !ffunE /=.ff0 x3
(tuc_ord (n:=n.+1 ) (t:=T) tln
(widen_ord (m:=n.+1 - T) oLn ord0)) =
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(widen_ord (m:=n.+1 - T) oLn ord0)) -> False
ffb
apply /eqP; rewrite (_ : tuc_ord _ _ = T); last by apply : val_inj.
by rewrite uT0 x3T3 np3Dp0.ff0 `cut [ oLn, `tuc[ tln, x3]]
\in [seq `cut [ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- (x0sb ++
rcons (x3, x3b, x3a).1 .2
(x3, x3b, x3a).1 .1 ) ++
rcons zz z2]]]
fe1
apply /map_f/mem_rm_rep; last first .ff0 `tuc[ tln, x3]
\in [seq `tuc[ tln, i]
| i <- (x0sb ++
rcons (x3, x3b, x3a).1 .2
(x3, x3b, x3a).1 .1 ) ++ rcons zz z2]
by apply : map_f; rewrite !(inE, mem_rcons, mem_cat, eqxx, orbT).
have onT : 0 < n.+1 - T by rewrite subn_gt0.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc ff1 onT : 0 < n.+1 - T
1010 fe1
apply /eqP=> /ffunP/(_ (Ordinal onT)); rewrite !ffunE /=.1017 x3
(tuc_ord (n:=n.+1 ) (t:=T) tln
(Ordinal (n:=n.+1 - T) (m:=0 ) onT)) =
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(Ordinal (n:=n.+1 - T) (m:=0 ) onT)) -> False
fe1
apply /eqP; rewrite (_ : tuc_ord _ _ = T); last by apply : val_inj.
by rewrite uT0 x3T3 np3Dp0.fdb 2 ^ K.-1 <=
size
`dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p))
z2]]]]
f55
have nTLnT : (n - T).-1 <= n.+1 - T - 1 .fdb (n - T).-1 <= n.+1 - T - 1
by rewrite -subn1; do 2 apply : leq_sub2r.
rewrite (size_cut_tuc nTLnT _ Puz3); last by apply : rirr.102a 2 ^ K.-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]] +
size
`dup[ `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `tuc[ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]]
f55
rewrite -[2 ^ _]prednK ?expn_gt0 // -addn1.102a (2 ^ K.-1 ).-1 + 1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]] +
size
`dup[ `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `tuc[ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]]
f55
apply : leq_add; last first .102a 0 <
size
`dup[ `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `tuc[ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]]
set cc := rm_rep _ _.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b cc := `dup[ `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `tuc[ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[
`tuc[ tln, u],
[seq
`tuc[ tln, i]
| i <-
z0sb ++
rcons
(behead (rcons z2b z2p)) z2]]]]]] : seq
(finfun_eqType
(ordinal_finType (n.+1 - T - 1 - (n - T).-1 ))
(ordinal_eqType 4 ))
ff2 103b
suff : ctuc nTLnT (ctuc oLn (ctuc tln z2)) \in cc by case : cc.1041 `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, z2]]] \in cc
103b
apply : mem_rm_rep.1041 `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, z2]]]
!= `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, u]]]
have oLn1 : 0 < n.+1 - T - 1 - (n - T).-1 .1041 0 < n.+1 - T - 1 - (n - T).-1
rewrite -subnDA add1n subSn; last by rewrite ltnW.1041 0 < (n - T).+1 - (n - T).-1 .+1
1052
rewrite prednK //; last by rewrite subn_gt0.1041 0 < (n - T).+1 - (n - T)
1052
by rewrite subn_gt0.
apply /eqP=> /ffunP/(_ (Ordinal oLn1)); rewrite !ffunE /=.1054 z2
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(tuc_ord (n:=n.+1 - T - 1 ) (t:=(n - T).-1 )
nTLnT
(Ordinal (n:=n.+1 - T - 1 - (n - T).-1 )
(m:=0 ) oLn1)))) =
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(tuc_ord (n:=n.+1 - T - 1 ) (t:=(n - T).-1 )
nTLnT
(Ordinal (n:=n.+1 - T - 1 - (n - T).-1 )
(m:=0 ) oLn1)))) -> False
104b
apply /eqP; rewrite (_ : tuc_ord _ _ = N); last first .1054 tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(tuc_ord (n:=n.+1 - T - 1 ) (t:=(n - T).-1 ) nTLnT
(Ordinal (n:=n.+1 - T - 1 - (n - T).-1 ) (m:=0 )
oLn1))) = N
apply : val_inj; rewrite /= add0n addn1 prednK ?subnK //.
by apply : ltnW.
by rewrite subn_gt0.
by rewrite z2N2 uN0.1041 `tuc[ nTLnT, `tuc[ oLn, `tuc[ tln, z2]]]
\in [seq `tuc[ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b
z2p)) z2]]]]]
103b
apply /map_f/mem_rm_rep; last first .1041 `tuc[ oLn, `tuc[ tln, z2]]
\in [seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead (rcons z2b z2p))
z2]]]
apply /map_f/mem_rm_rep; last first .1041 `tuc[ tln, z2]
\in [seq `tuc[ tln, i]
| i <- z0sb ++
rcons (behead (rcons z2b z2p)) z2]
by apply : map_f; rewrite !(inE, mem_rcons, mem_cat, eqxx, orbT).
have oLn1 : n - T < n.+1 - T by apply : ltn_sub2r.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 1042 oLn1 : n - T < n.+1 - T
108a 1081
apply /eqP=> /ffunP/(_ (Ordinal oLn1)); rewrite !ffunE /=.1091 z2
(tuc_ord (n:=n.+1 ) (t:=T) tln
(Ordinal (n:=n.+1 - T) (m:=n - T) oLn1)) =
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(Ordinal (n:=n.+1 - T) (m:=n - T) oLn1)) -> False
1081
apply /eqP; rewrite (_ : tuc_ord _ _ = N); last first .1091 tuc_ord (n:=n.+1 ) (t:=T) tln
(Ordinal (n:=n.+1 - T) (m:=n - T) oLn1) = N
by apply : val_inj; rewrite /= subnK // ltnW.
by rewrite z2N2 uN0.
have oLn1 : (n - T).-1 < n.+1 - T - 1 .1041 (n - T).-1 < n.+1 - T - 1
rewrite -subn1; apply : ltn_sub2r.
by rewrite ltn_subRL ltnS addn1.
by apply : ltn_sub2r.
apply /eqP=> /ffunP/(_ (Ordinal oLn1)); rewrite !ffunE /=.10a9 z2
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(Ordinal (n:=n.+1 - T - 1 ) (m:=(n - T).-1 )
oLn1))) =
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(Ordinal (n:=n.+1 - T - 1 ) (m:=(n - T).-1 )
oLn1))) -> False
103b
apply /eqP; rewrite (_ : tuc_ord _ _ = N); last first .10a9 tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(Ordinal (n:=n.+1 - T - 1 ) (m:=(n - T).-1 ) oLn1)) =
N
by apply : val_inj; rewrite /= addn1 prednK ?subnK ?subn_gt0 // ltnW.
by rewrite z2N2 uN0.102a (2 ^ K.-1 ).-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]]
f55
move => {sd card_sdE}//.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b
((2 ^ K.-1 ).-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb ++
rcons
(behead
(rcons z2b z2p))
z2]]]]]]) = true
f55
have fproj (i : 'I_(n - T).-1 ) : i + T.+1 < n.+1 .5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b i : 'I_(n - T).-1
i + T.+1 < n.+1
rewrite {3 }(_ : n.+1 = ((n - T).-1 + T.+1 ).+1 ).10d1 i + T.+1 < ((n - T).-1 + T.+1 ).+1
by rewrite ltnS leq_add2r // ltnW.
by rewrite -subnS subnK.
pose oproj i := Ordinal (fproj i).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 oproj := fun i : 'I_(n - T).-1 =>
Ordinal (n:=n.+1 ) (m:=i + T.+1 ) (fproj i): 'I_(n - T).-1 -> 'I_n.+1
10cd f55
have oprojE i : oproj i =
tuc_ord tln (tuc_ord oLn (widen_ord nTLnT i)).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10d2
oproj i =
tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(widen_ord (m:=n.+1 - T - 1 ) nTLnT i))
by apply /val_inj; rewrite /= addn1 addnS.
rewrite !(map_cat, cat_rm_rep, size_cat).10f2 ((2 ^ K.-1 ).-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]] +
size
`dup[ last `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]]
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb]]]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ last `tuc[ oLn, `tuc[ tln, u]]
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i]
| i <- z0sb]]],
[seq `tuc[ oLn, i]
| i <- `dup[ last `tuc[ tln, u]
[seq `tuc[ tln, i]
| i <- z0sb],
[seq `tuc[ tln, i]
| i <- rcons
(behead
(rcons z2b z2p))
z2]]]]]]) = true
f55
apply : leq_trans (leq_addr _ _).10f2 (2 ^ K.-1 ).-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]]
f55
pose f (i : configuration 4 _) := ccut nTLnT (ctuc oLn (ctuc tln i)).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 f := fun i : configuration 4 n.+1 =>
`cut [ nTLnT, `tuc[ oLn, `tuc[ tln, i]]]: configuration 4 n.+1 -> configuration 4 (n - T).-1
10fe f55
have /gpath_path/(path_tuc tln)/(path_tuc oLn)/(path_cut nTLnT) := gHuz0.1102 path (move (q:=4 ) (rrel (n:=4 )))
`cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]]
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]] ->
(2 ^ K.-1 ).-1 <=
size
`dup[ `cut [ nTLnT, `tuc[ oLn, `tuc[ tln, u]]],
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]]
f55
pose u1 := f u; rewrite -[ccut _ _]/u1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 u1 := f u : configuration 4 (n - T).-1
path (move (q:=4 ) (rrel (n:=4 ))) u1
`dup[ u1,
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]] ->
(2 ^ K.-1 ).-1 <=
size
`dup[ u1,
[seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]]]]]]
f55
set cs := map _ _ => path1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c cs := [seq `cut [ nTLnT, i]
| i <- `dup[ `tuc[ oLn, `tuc[ tln, u]],
[seq `tuc[ oLn, i]
| i <- `dup[
`tuc[ tln, u],
[seq
`tuc[ tln, i]
| i <- z0sb]]]]] : seq (configuration 4 (n - T).-1 )
path1 : path (move (q:=4 ) (rrel (n:=4 ))) u1
`dup[ u1, cs]
(2 ^ K.-1 ).-1 <= size `dup[ u1, cs]
f55
have csL : last u1 (rm_rep u1 cs) = f z0.1111 last u1 `dup[ u1, cs] = f z0
by rewrite /u1 /cs /f !(last_rm_rep, last_map).
pose sd1 := oproj @^-1 : (E'' :\ N).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c sd1 := oproj @^-1 : (E'' :\ N) : {set ordinal_finType (n - T).-1 }
1114 f55
have card_sd1 : #|sd1| = K.-1 .
have := TLN; rewrite leq_eqVlt => /orP[/eqP /= TEN| TLNN].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 TEN : T.+1 = n
1128
have := KTE; rewrite -{2 }TEN -[T.+1 ]addn1 leq_add2l.1130 K <= 1 -> #|sd1| = K.-1
1132
case : (K) K_gt0 => // [] [] //= _ _; apply /eqP.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1131
#|sd1| == 0
1132
rewrite cards_eq0; apply /eqP/setP; move : (sd1).113d forall sd1 : {set ordinal_finType (n - T).-1 },
sd1 =i set0
1132
suff -> : (n - T).-1 = 0 by move => sd [].
by rewrite -{1 }TEN subSn // subnn.
have ov : 0 < (n - T).-1 by rewrite -subn1 !ltn_subRL addn0 addn1.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1135 ov : 0 < (n - T).-1
1128 1129
pose o := Ordinal ov.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1135 114e o := Ordinal (n:=(n - T).-1 ) (m:=0 ) ov : 'I_(n - T).-1
1128 1129
rewrite /sd1 /K (cardsD1 N) NiE'' /= on_card_preimset //.1152 {on E'' :\ N, bijective oproj}
1129
exists (fun i : disk n.+1 => insubd o (i - T.+1 )) => i; rewrite !inE /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1135 114e 1153 i : ordinal_finType (n - T).-1
[&& oproj i != N, u (oproj i) == p0 & T < i + T.+1 ] ->
insubd o (i + T.+1 - T.+1 ) = i
rewrite -val_eqE => /= /and3P[iDT uEp0 _].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1135 114e 1153 115c iDT : i + T.+1 != n
uEp0 : u (oproj i) == p0
insubd o (i + T.+1 - T.+1 ) = i
115e
by apply : val_inj; rewrite val_insubd /= addnK ltn_ord.
rewrite -val_eqE => /= /and3P[iDN uEp0 TLi].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 1135 114e 1153 171 iDN : i != n
uEp0 : u i == p0
TLi : T < i
oproj (insubd o (i - T.+1 )) = i
1129
apply : val_inj; rewrite /= val_insubd ifT ?subnK //.116f i - T.+1 < (n - T).-1
1129
rewrite subnS -!subn1 !ltn_sub2r //.
by rewrite -[_ - _]prednK // subn_gt0.
by rewrite ltn_neqAle iDN /= -ltnS.
pose sp1 := [set ~ np3].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c sp1 := [set ~ np3] : {set ordinal_finType 4 }
1114 f55
have card_sp1 : #|sp1| = 3 .
by have := cardsC [set np3]; rewrite cards1 card_ord => [] [].
have p0Isp : p0 \in sp1 by rewrite !inE eq_sym.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 p0Isp : p0 \in sp1
1114 f55
have F1 pg1 pg2 : pg1 \in sp1 -> pg2 \in sp1 -> rrel pg1 pg2 ->
rrel (enum_rank_in p0Isp pg1) (enum_rank_in p0Isp pg2).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 22d
pg1 \in sp1 ->
pg2 \in sp1 ->
rrel (n:=4 ) pg1 pg2 ->
rrel (n:=#|[eta sp1]|)
(enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp pg1)
(enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp pg2)
rewrite !inE /rrel /= => pg1Dp3 pg2Dpg3 pg1Dpg2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 22d 237 238 239
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp pg1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp pg2
119e
apply : contra_neq pg1Dpg2 => /enum_rank_in_inj.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 22d 237 238
(pg1 \in sp1 -> pg2 \in sp1 -> pg1 = pg2) -> pg1 = pg2
119e
by rewrite !inE; apply .
have csV : all (cvalid sd1 sp1) (u1 :: `dup[ u1, cs]).11a0 all (cvalid (n:=(n - T).-1 ) sd1 (k:=4 ) sp1)
(u1 :: `dup[ u1, cs])
apply /allP=> i; rewrite !inE => /orP[/eqP-> | iId]; apply /cvalidP => j.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 i : finfun_eqType (ordinal_finType (n - T).-1 )
(ordinal_eqType 4 )
j : ordinal_finType (n - T).-1
j \in sd1 -> u1 j \in sp1
rewrite !inE !ffunE /= -val_eqE /= => /and3P[jTDn /eqP uP _].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11bb 11bc jTDn : j + T.+1 != n
uP : u (oproj j) = p0
u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(widen_ord (m:=n.+1 - T - 1 ) nTLnT j))) != np3
11be
by rewrite -oprojE uP eq_sym.
rewrite !inE -val_eqE /= => /and3P[jTDn uEp0 TLjT].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11bb 11c1 11bc 11c7 uEp0 : u (oproj j) == p0
TLjT : T < j + T.+1
i j != np3
11b3
have /mapP[i1 /subset_rm_rep /mapP[i2]] := subset_rm_rep iId.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11bb 11c1 11bc 11c7 11d1 11d2 i1 : finfun_eqType (ordinal_finType (n.+1 - T - 1 ))
(ordinal_eqType 4 )
i2 : finfun_eqType (ordinal_finType (n.+1 - T))
(ordinal_eqType 4 )
i2
\in `dup[ `tuc[ tln, u],
[seq `tuc[ tln, i] | i <- z0sb]] ->
i1 = `tuc[ oLn, i2] ->
i = `cut [ nTLnT, i1] -> i j != np3
11b3
move => /subset_rm_rep /mapP[i3 i3Iz0b] -> -> ->.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11bb 11c1 11bc 11c7 11d1 11d2 11d8 11d9 i3 : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 )
i3Iz0b : i3 \in z0sb
`cut [ nTLnT, `tuc[ oLn, `tuc[ tln, i3]]] j != np3
11b3
rewrite !ffunE -oprojE.11de i3 (oproj j) != np3
11b3
apply : memE''; first by rewrite gE' !(inE, mem_cat, i3Iz0b, orbT).5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11bb 11c1 11bc 11c7 11d1 11d2 11d8 11d9 11df 11e0
oproj j \in E''
11b3
by rewrite !inE /= uEp0.
apply : leq_trans (gdist_cset2 F1 csV csL path1).11b5 (2 ^ K.-1 ).-1 <=
`d[cset2 (n:=(n - T).-1 ) sd1 (k:=4 ) (sp:=sp1) (p0:=p0)
p0Isp u1, cset2 (n:=(n - T).-1 ) sd1 (k:=4 )
(sp:=sp1) (p0:=p0) p0Isp (f z0)]_
(move (q:=#|sp1|) (rrel (n:=#|[eta sp1]|)))
f55
have -> : cset2 sd1 p0Isp u1 = `c[enum_rank_in p0Isp p0].11b5 cset2 (n:=(n - T).-1 ) sd1 (k:=4 ) (sp:=sp1) (p0:=p0)
p0Isp u1 =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0]
apply /ffunP => i ; rewrite !ffunE /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11b6 i : ordinal_finType #|sd1|
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp
(u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(widen_ord (m:=n.+1 - T - 1 ) nTLnT
(enum_val i))))) =
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp p0
11f6
have := enum_valP i; rewrite !inE /=.11fc [&& oproj (enum_val i) != N,
u (oproj (enum_val i)) == p0
& T < enum_val i + T.+1 ] ->
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp
(u
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(widen_ord (m:=n.+1 - T - 1 ) nTLnT
(enum_val i))))) =
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp p0
11f6
rewrite (_ : tuc_ord _ _ = oproj (enum_val i)).11fc [&& oproj (enum_val i) != N,
u (oproj (enum_val i)) == p0
& T < enum_val i + T.+1 ] ->
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp (u (oproj (enum_val i))) =
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp p0
by move => /and3P[_ /eqP->].
by apply : val_inj => /=; rewrite addn1 addSnnS.11b5 (2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0], cset2 (n:=(n - T).-1 ) sd1
(k:=4 ) (sp:=sp1)
(p0:=p0) p0Isp (f z0)]_
(move (q:=#|sp1|) (rrel (n:=#|[eta sp1]|)))
f55
case : (@peg4comp3 (z0s N) p0 np3) => [|||np1 [[np1Dnp3 np1Dp0 np1Dz] Hnz]].
- 1212
by [].
- 1223
by apply : memE'' => //; rewrite gE' !(mem_cat, inE, eqxx, orbT).
- 1228
by rewrite eq_sym.
have -> : cset2 sd1 p0Isp (f z0) = `c[enum_rank_in p0Isp np1].121b cset2 (n:=(n - T).-1 ) sd1 (k:=4 ) (sp:=sp1) (p0:=p0)
p0Isp (f z0) =
`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp np1]
apply /ffunP => i ; rewrite !ffunE /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11b6 121c 121d 121e 121f 1220 11fd
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp
(z0
(tuc_ord (n:=n.+1 ) (t:=T) tln
(tuc_ord (n:=n.+1 - T) (t:=1 ) oLn
(widen_ord (m:=n.+1 - T - 1 ) nTLnT
(enum_val i))))) =
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp np1
1233
have := enum_valP i; rewrite !inE -val_eqE /= => /and3P[iTEN uEp0 TLiT].5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11b6 121c 121d 121e 121f 1220 11fd iTEN : enum_val i + T.+1 != n
uEp0 : u (oproj (enum_val i)) == p0
TLiT : T < enum_val i + T.+1
123a 1233
rewrite -oprojE; case : (Hnz (z0 (oproj (enum_val i)))) => // /eqP.123e z0 (oproj (enum_val i)) == z0s N ->
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp (z0 (oproj (enum_val i))) =
enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp np1
- 1243
rewrite -[_ == z0s N]negbK; case /negP.123e z0 (oproj (enum_val i)) != z0s N
1246
apply : (move_on_toplDr z0Mz0s) => //=.123e enum_val i + T.+1 <= n
1246
by rewrite -{8 }[n](subnK TLN) leq_add2r subnS ltnW.
- 1257
rewrite -[_ == p0]negbK; case /negP; rewrite -z0N0.123e z0 (oproj (enum_val i)) != z0 N
1259
apply : (move_on_toplDl z0Mz0s) => //=.123e enum_val i + T.+1 < n
1259
by rewrite -{8 }[n](subnK TLN) ltn_add2r subnS.
rewrite -[_ == np3]negbK; case /negP.123e z0 (oproj (enum_val i)) != np3
1266
apply : memE''.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11b6 121c 121d 121e 121f 1220 11fd 123f 1240 1241
z0 \in u :: g
have := mem_last u z0sb; rewrite -/z0 gE' !inE !mem_cat.126e (z0 == u) || (z0 \in z0sb) ->
[|| z0 == u, z0 \in z0sb | z0 \in z0s :: z0sa]
1270
by case /orP=> ->; rewrite ?orbT .
by rewrite !inE /= uEp0.
by move => /eqP ->.121b (2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=sp1)
p0Isp np1]]_(move
(q:=#|sp1|)
(rrel
(n:=#|[eta sp1]|)))
f55
have : (enum_rank_in p0Isp np1 != (enum_rank_in p0Isp p0)).121b enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp np1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0
apply /eqP => /enum_rank_in_inj.121b (np1 \in sp1 -> p0 \in sp1 -> np1 = p0) -> False
1285
rewrite !inE np1Dnp3 eq_sym np3Dp0 => /(_ isT isT) /eqP.121b np1 == p0 -> False
1285
by rewrite (negPf np1Dp0).121b enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0) (A:=sp1)
p0Isp np1
!= enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0 ->
(2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in (T:=ordinal_finType 4 ) (x0:=p0)
(A:=sp1) p0Isp p0], `c[enum_rank_in
(T:=ordinal_finType 4 )
(x0:=p0) (A:=sp1)
p0Isp np1]]_(move
(q:=#|sp1|)
(rrel
(n:=#|[eta sp1]|)))
f55
move : (enum_rank_in _ _) (enum_rank_in _ _).121b forall
enum_rank_in
enum_rank_in0 : ordinal_subType #|[eta sp1]|,
enum_rank_in0 != enum_rank_in ->
(2 ^ K.-1 ).-1 <=
`d[`c[enum_rank_in], `c[enum_rank_in0]]_(move
(q:=#|sp1|)
(rrel
(n:=#|[eta sp1]|)))
f55
rewrite card_sd1 card_sp1 => /= cp1 cp2 cp1Dcp2.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 fc9 fce fd3 fdc 102b 10d7 10ea 10f3 1103 110c 1112 1113 111c 1124 112c 1188 1190 1198 11a1 11b6 121c 121d 121e 121f 1220 cp1, cp2 : 'I_3
cp1Dcp2 : cp2 != cp1
(2 ^ K.-1 ).-1 <=
`d[`c[cp1], `c[cp2]]_(move (q:=3 ) (rrel (n:=3 )))
f55
have := gdist_rhanoi3p K.-1 cp1 cp2.129b `d[`c[cp1], `c[cp2]]_rmove =
(2 ^ K.-1 ).-1 * (cp1 != cp2) ->
(2 ^ K.-1 ).-1 <=
`d[`c[cp1], `c[cp2]]_(move (q:=3 ) (rrel (n:=3 )))
f55
by rewrite eq_sym (negPf cp1Dcp2) muln1 => ->.
have dz2v_leq : psi (s2f B) <= `d[z2, v]_rmove.f57 psi (s2f (n:=n) B) <= `d[z2, v]_rmove
have cH1 : codom β[v] \subset [:: np2; np3] by apply : codom_liftr.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1df 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 f58 cH1 : codom β[v] \subset [:: np2; np3]
12a9 12aa
apply : leq_trans (gdist_cunlift (connect_move _ _)).12b1 psi (s2f (n:=n) B) <=
`d[β[z2], β[v]]_(move (q:=4 ) (rrel (n:=4 )))
12aa
by apply : IH cH1.
move : gHuv; rewrite gE' z0sz0saE catA => /gdist_cat-> /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 f58 12ad
psi (s2f (n:=n.+1 ) E) <=
`d[u, last u
(z0sb ++ rcons (behead (rcons z2b z2p)) z2)]_rmove +
`d[last u (z0sb ++ rcons (behead (rcons z2b z2p)) z2), v]_rmove
rewrite last_cat last_rcons.12bd psi (s2f (n:=n.+1 ) E) <=
`d[u, z2]_rmove + `d[z2, v]_rmove
apply : leq_trans (leq_add duz2_leq dz2v_leq).12bd psi (s2f (n:=n.+1 ) E) <=
(psi (s2f (n:=n.+1 ) E `&` `[T]) + psi (s2f (n:=T) A) +
2 ^ K.-1 ).+1 + psi (s2f (n:=n) B)
rewrite addSn addnAC addnC -!addnA -2 !addnS addnA.12bd psi (s2f (n:=n.+1 ) E) <=
2 ^ K.-1 + psi (s2f (n:=n.+1 ) E `&` `[T]) +
(psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).+1
have pH : psi (s2f E) <= psi (s2f E `&` `[T]) + (psi `[(T + K).+1 ] - psi `[T]).12bd psi (s2f (n:=n.+1 ) E) <=
psi (s2f (n:=n.+1 ) E `&` `[T]) +
(psi `[(T + K).+1 ] - psi `[T])
rewrite -leq_subLR -addnS.12bd psi (s2f (n:=n.+1 ) E) - psi (s2f (n:=n.+1 ) E `&` `[T]) <=
psi `[T + K.+1 ] - psi `[T]
12cf
have {1 }->: s2f E = (s2f E `&` `[T]) `|` s2f (T |: E'').12bd s2f (n:=n.+1 ) E =
s2f (n:=n.+1 ) E `&` `[T] `|` s2f (n:=n.+1 ) (T |: E'')
apply /fsetP => i; rewrite !(inE, mem_sint, s2fU, s2f1, s2f_pred) /=.5 142 143 12b 13a 13b 13c 156 15c 165 185 18a 18f 194 19c 1ab 1ac 1bb 1d6 1de 1e7 1ef 2bc 2c1 2c8 2d0 2d8 2dd 2e6 2fd 302 30a 32e 338 339 351 352 353 354 355 35a 35f 364 369 371 37d 382 38a 3b1 3b2 3b3 3b4 3b5 3ba 3c3 3cc 3d5 3dd 3e9 3f1 40b 40c 40d 40e 40f 414 41c 428 430 438 43d 442 45a 45b 462 463 45c 464 481 493 49b 4aa 4af 4b4 4bc 4c4 4c9 4d1 4e3 52c 531 539 582 6d1 6d9 753 587 58c a4c a51 616 617 618 7ce 7cf a61 a8c a91 a96 aa3 ab9 b06 b97 b9c ba5 d24 d2e d62 d6a d72 d77 d7c d81 d8a d92 d9c da6 db0 dbb dc8 aae dd9 dde de6 e0a e3d e7d eb8 f58 12ad ed9
(i \in s2f (n:=n.+1 ) E) =
[|| (i \in s2f (n:=n.+1 ) E) && (i < T), i == T
| (i
\in [eta mem_seq (T:=nat_choiceType)
(s2f (n:=n.+1 ) E)]) && (T < i)]
12db
case : (ltngtP i T); rewrite ?(andbT, andbF, orbT, orbF) // => ->.12e1 (T \in s2f (n:=n.+1 ) E) = true
12db
by apply /idP; apply /imfsetP; exists T ; rewrite // inE uT0.
apply : psi_add => //.12bd s2f (n:=n.+1 ) E `&` `[T] `<=` `[T]
by apply /fsubsetP=> i; rewrite !inE => /andP[].
rewrite card_s2f (cardsD1 T) !inE eqxx /= ltnS /K.12bd #|(T |: E'') :\ T| <= #|E''|
12cf
by apply /subset_leq_card/subsetP => i; rewrite !inE; case : (_ == _).
apply : leq_trans pH _; rewrite -leq_double !doubleD !doubleB /=.12bd (psi (s2f (n:=n.+1 ) E `&` `[T])).*2 +
((psi `[(T + K).+1 ]).*2 - (psi `[T]).*2 ) <=
(2 ^ K.-1 ).*2 + (psi (s2f (n:=n.+1 ) E `&` `[T])).*2 +
((psi (s2f (n:=T) A) + psi (s2f (n:=n) B)).+1 ).*2
apply : leq_trans (leq_add (leqnn _) psiAB_leq).12bd (psi (s2f (n:=n.+1 ) E `&` `[T])).*2 +
((psi `[(T + K).+1 ]).*2 - (psi `[T]).*2 ) <=
(2 ^ K.-1 ).*2 + (psi (s2f (n:=n.+1 ) E `&` `[T])).*2 +
psi `[T + K + 1 ]
rewrite -addnA addnCA leq_add2l addn1 leq_subLR -addnn addnA leq_add2r.12bd psi `[(T + K).+1 ] <= (psi `[T]).*2 + (2 ^ K.-1 ).*2
rewrite -addnS -[(2 ^ _).*2 ]mul2n -expnS prednK //.12bd psi `[T + K.+1 ] <= (psi `[T]).*2 + 2 ^ K
by apply : psi_leD.
Qed .
Lemma gdist_geq (n : nat) (p1 p2 : peg 4 ) :
p1 != p2 -> Ο(n) <= `d[`c[p1, n], `c[p2, n]]_rmove.4 p1 != p2 -> Ο(n) <= `d[`c[p1 , n], `c[p2 , n]]_rmove
Proof .130c
case : n => // n p1Dp2.6 5 d
Ο(n.+1 ) <= `d[`c[p1], `c[p2]]_rmove
have /gpath_connect [g gHp1p2] := connect_move `c[p1, n.+1 ] `c[p2, n.+1 ].6 5 d 1de gHp1p2 : gpath rmove `c[p1] `c[p2] g
1314
have p2Ig : `c[p2] \in g.
have := mem_last `c[p1] g.1318 last `c[p1] g \in `c[p1] :: g -> `c[p2] \in g
131e
by rewrite inE (gpath_last gHp1p2) eq_sym perfect_eqE (negPf p1Dp2).
pose N : disk n.+1 := ldisk.
have cH : codom `c[p2, n.+1 ] \subset [:: p2].132c codom `c[p2] \subset [:: p2]
by apply /subsetP=> i /codomP[j]; rewrite inE ffunE => ->.
case (@split_first _ g (fun c : configuration _ _ => c(N) != p1)) => /=.1333 ~~
all [predC fun c : configuration 4 n.+1 => c N != p1]
g
apply /negP=> /allP /(_ _ p2Ig); rewrite /= -topredE negbK.1333 `c[p2] N == p1 -> False
133c
have /subsetP/(_ (`c[p2] N))/(_ (codom_f _ _)) := cH.1333 `c[p2] N \in [:: p2] -> `c[p2] N == p1 -> False
133c
by rewrite !inE !ffunE eq_sym (negPf p1Dp2).
move => [[z0s z0sb] z0sa] /= [/allP z0sbP0 z0sND0 gE'].6 5 d 1de 1319 1321 15c 1334 40b 40c z0sbP0 : {in z0sb,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : configuration 4 n.+1 =>
c N != p1] x}
z0sND0 : z0s N != p1
40f 1314
pose z0 := last `c[p1] z0sb.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f z0 := last `c[p1] z0sb: configuration 4 n.+1
1314
have z0N1 : z0 N = p1.
have := mem_last `c[p1] z0sb; rewrite !inE /z0 => /orP[/eqP->|/z0sbP0].
by rewrite ffunE.1353 [predC fun c : configuration 4 n.+1 => c N != p1]
(last `c[p1] z0sb) -> last `c[p1] z0sb N = p1
1359
by rewrite !inE negbK => /eqP.
have z0NDz0sN : z0 N != z0s N by rewrite z0N1 eq_sym.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428
1314
have z0Mz0s : z0 `-->_r z0s.
by move : (gpath_path gHp1p2); rewrite gE' cat_path /= => /and3P[].
move : (gHp1p2); rewrite gE' => /gpath_catl; rewrite -/z0 => gHp1z0.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 gHp1z0 : gpath rmove `c[p1] z0 z0sb
1314
move : (gHp1p2); rewrite gE' => /gpath_catr; rewrite -/z0 => gHz0p2.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c gHz0p2 : gpath rmove z0 `c[p2] (z0s :: z0sa)
1314
move : (gHp1p2); rewrite gE' => /gdist_cat; rewrite -/z0 => dp1p2E.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 dp1p2E : `d[`c[p1], `c[p2]]_rmove =
`d[`c[p1], z0]_rmove + `d[z0, `c[p2]]_rmove
1314
case (@split_last _ (z0 :: z0s :: z0sa)
(fun c : configuration _ _ => c N != p2)).1385 ~~
all [predC fun c : configuration 4 n.+1 => c N != p2]
[:: z0, z0s & z0sa]
have z0Iz0sz0sa : z0 \in z0 :: z0s :: z0sa by rewrite inE eqxx.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 44e
138a 138b
apply /negP=> /allP /(_ _ z0Iz0sz0sa); rewrite /= -topredE negbK.1391 z0 N == p2 -> False
138b
by rewrite z0N1 (negPf p1Dp2).
move => [[z2p z2b] [|z2 z2a]] /= [z2pN2 z2aEp2 z0sz0saE].6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b z2pN2 : z2p N != p2
z2aEp2 : true
45e 1314
have : last z0 (z0s :: z0sa) = z2p.
by rewrite -[last _ _]/(last z0 (z0 :: z0s :: z0sa)) z0sz0saE last_cat.
move : (gpath_last gHp1p2); rewrite gE' last_cat /= => -> p2Ez2p.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 139d 139e 45e p2Ez2p : `c[p2] = z2p
1314 139f
by case /eqP: z2pN2; rewrite -p2Ez2p ffunE.
have {}z2aEp2 c : c \in z2 :: z2a -> c N = p2.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13a2 465 20a
c \in z2 :: z2a -> c N = p2
case /andP: z2aEp2; rewrite -topredE negbK => /eqP z2NEp2 /allP H.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 465 20a z2NEp2 : z2 N = p2
H : {in z2a,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : configuration 4 n.+1 => c N != p2]
x}
13b8 13b9
by rewrite inE => /orP[/eqP-> //|/H/=]; rewrite -topredE negbK => /eqP.
have z0Ez2p : z2b = [::] -> z0 = z2p by case : z2b z0sz0saE => [[]|].6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 465 13bc 493
1314
have {}z0sz0saE : z0s :: z0sa = (rcons (behead (rcons z2b z2p)) z2) ++ z2a.
case : (z2b) z0sz0saE => [[_ -> ->]|zz ll [_ ->]] //=.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 4a0 4a1
4a2 13cd
by rewrite !cat_rcons.
move : (gHz0p2); rewrite z0sz0saE => /gpath_catl; rewrite last_rcons => gHz0z2.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa
1314
move : (gHz0p2); rewrite z0sz0saE => /gpath_catr; rewrite last_rcons => gHz2p2.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa gHz2p2 : gpath rmove z2 `c[p2] z2a
1314
move : (gHz0p2); rewrite z0sz0saE => /gdist_cat; rewrite last_rcons => dz0p2E.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df dz0p2E : `d[z0, `c[p2]]_rmove =
`d[z0, z2]_rmove + `d[z2, `c[p2]]_rmove
1314
have z2Ig : z2 \in g.
by rewrite gE' z0sz0saE !(inE, mem_cat, mem_rcons, eqxx, orbT).
have z2N2 : z2 N = p2 by apply : z2aEp2; rewrite inE eqxx.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc z2N2 : z2 N = p2
1314
have z2pNDz2N : z2p N != z2 N by rewrite z2N2.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9
1314
have z2pMz2 : z2p `-->_r z2.
move : gHz0z2; case : (z2b) z0Ez2p => [->// /gpath_path/andP[] |a l _] //=.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 49b 13df 13e4 4bc 13f2 4c9 4d6 4d7
4d8 13fa
by rewrite -cats1 => /gpath_catr; rewrite last_rcons => /gpath_path/andP[].
have dp1z0_leq : psi `[N] <= `d[`c[p1], z0]_rmove.13fc psi `[N] <= `d[`c[p1], z0]_rmove
have -> : `[N] = s2f [set i | β[`c[p1, n.+1 ]] i == p1].13fc `[N] = s2f (n:=n) [set i | β[`c[p1]] i == p1]
apply /fsetP => i; rewrite mem_sint.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 ed9
(0 <= i < N) =
(i \in s2f (n:=n) [set i | β[`c[p1]] i == p1])
1410
apply /idP/imfsetP; last by move => /= [j]; rewrite inE !ffunE // => _ ->.1416 0 <= i < N ->
exists2 x : ordinal_choiceType n,
in_mem x
(mem_fin
(fin_finpred
(pT:=pred_finpredType (ordinal_finType n))
[set i | β[`c[p1]] i == p1])) & i = x
1410
by move => /= iLN; exists (Ordinal iLN );rewrite //= inE !ffunE.
apply : leq_trans (gdist_cunlift _); last by apply : connect_move.13fc psi (s2f (n:=n) [set i | β[`c[p1]] i == p1]) <=
`d[β[`c[p1]], β[z0]]_(move (q:=4 ) (rrel (n:=4 )))
1408
have /peg4comp2[pp1 [pp2 [[pp2Dpp1 pp2Dpz0sN pp2Dz0N] [pp1Dz0sN pp1Dz0N] Hz]]]
:= z0NDz0sN.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 c21 pp2Dpp1 : pp2 != pp1
pp2Dpz0sN : pp2 != z0s N
pp2Dz0N : pp2 != z0 N
pp1Dz0sN : pp1 != z0s N
pp1Dz0N : pp1 != z0 N
Hz : forall p : peg 4 ,
[\/ p = z0 N, p = z0s N, p = pp1 | p = pp2]
1422 1408
have cH1 : codom β[z0] \subset [:: pp1; pp2].1426 codom β[z0] \subset [:: pp1; pp2]
apply /subsetP => i /codomP[j ->]; rewrite !inE ffunE.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 c21 1427 1428 1429 142a 142b 142c 1c0 4ff
(z0 (trshift 1 j) == pp1) || (z0 (trshift 1 j) == pp2)
1431
case : (Hz (z0 (trshift 1 j))); try by move ->; rewrite ?(eqxx, orbT).1438 z0 (trshift 1 j) = z0 N ->
(z0 (trshift 1 j) == pp1) || (z0 (trshift 1 j) == pp2)
move => /eqP; rewrite -[_ == z0 N]negbK; case /negP.1438 z0 (trshift 1 j) != z0 N
143e
by apply : (move_on_toplDl z0Mz0s) => /=.
move => /eqP; rewrite -[_ == z0s N]negbK; case /negP.1438 z0 (trshift 1 j) != z0s N
1431
by apply : (move_on_toplDr z0Mz0s); rewrite //= ltnW.
by apply : gdist_le_psi cH1; split => //; rewrite -z0N1.
have dp2z2_leq : psi `[N] <= `d[`c[p2], z2]_rmove.140a psi `[N] <= `d[`c[p2], z2]_rmove
have -> : `[N] = s2f [set i | β[`c[p2, n.+1 ]] i == p2].140a `[N] = s2f (n:=n) [set i | β[`c[p2]] i == p2]
apply /fsetP => i; rewrite mem_sint.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 140b ed9
(0 <= i < N) =
(i \in s2f (n:=n) [set i | β[`c[p2]] i == p2])
145e
apply /idP/imfsetP; last by move => /= [j]; rewrite inE !ffunE // => _ ->.1464 0 <= i < N ->
exists2 x : ordinal_choiceType n,
in_mem x
(mem_fin
(fin_finpred
(pT:=pred_finpredType (ordinal_finType n))
[set i | β[`c[p2]] i == p2])) & i = x
145e
by move => /= iLN; exists (Ordinal iLN );rewrite //= inE !ffunE.
apply : leq_trans (gdist_cunlift _); last by apply : connect_move.140a psi (s2f (n:=n) [set i | β[`c[p2]] i == p2]) <=
`d[β[`c[p2]], β[z2]]_(move (q:=4 ) (rrel (n:=4 )))
1456
have /peg4comp2[pp1 [pp2 [[pp2Dpp1 pp2Dpz2sN pp2Dz2N] [pp1Dz2sN pp1Dz2N] Hz]]]
:= z2pNDz2N.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 140b c21 1427 pp2Dpz2sN : pp2 != z2 N
pp2Dz2N : pp2 != z2p N
pp1Dz2sN : pp1 != z2 N
pp1Dz2N : pp1 != z2p N
Hz : forall p : peg 4 ,
[\/ p = z2p N, p = z2 N, p = pp1 | p = pp2]
1470 1456
have cH1 : codom β[z2] \subset [:: pp1; pp2].1474 codom β[z2] \subset [:: pp1; pp2]
apply /subsetP => i /codomP[j ->]; rewrite !inE ffunE.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 140b c21 1427 1475 1476 1477 1478 1479 1c0 4ff
(z2 (trshift 1 j) == pp1) || (z2 (trshift 1 j) == pp2)
147e
case : (Hz (z2 (trshift 1 j))); try by move ->; rewrite ?(eqxx, orbT).1485 z2 (trshift 1 j) = z2p N ->
(z2 (trshift 1 j) == pp1) || (z2 (trshift 1 j) == pp2)
move => /eqP; rewrite -[_ == z2p N]negbK; case /negP.
by apply : (move_on_toprDl z2pMz2) => //=; rewrite ltnW.
move => /eqP; rewrite -[_ == z2 N]negbK; case /negP.
by apply : (move_on_toprDr z2pMz2); rewrite /=.
by apply : gdist_le_psi cH1; split => //; rewrite -z2N2.
rewrite dp1p2E; apply : leq_trans (leq_add dp1z0_leq (leqnn _)).1458 Ο(n.+1 ) <= psi `[N] + `d[z0, `c[p2]]_rmove
rewrite dz0p2E [gdist _ z2 _]gdistC ?addnA ; last by apply /move_sym/rsym.1458 Ο(n.+1 ) <=
psi `[N] + `d[z0, z2]_rmove + `d[`c[p2], z2]_rmove
apply : leq_trans (leq_add (leqnn _) dp2z2_leq).1458 Ο(n.+1 ) <= psi `[N] + `d[z0, z2]_rmove + psi `[N]
rewrite addnAC addnn psi_sint_phi addnC.1458 Ο(n.+1 ) <= `d[z0, z2]_rmove + Ο(N.+1 ).-1
move : (gdist_gt0 rmove z0 z2).1458 (0 < `d[z0, z2]_rmove) = (z0 != z2) ->
Ο(n.+1 ) <= `d[z0, z2]_rmove + Ο(N.+1 ).-1
have -> : z0 != z2.
by apply /eqP => /ffunP/(_ ldisk) /eqP; rewrite z0N1 z2N2 (negPf p1Dp2).
move /idP; case : gdist => // k _.6 5 d 1de 1319 1321 15c 1334 40b 40c 134e 134f 40f 1354 135c 428 430 137c 1381 1386 45a 45b 462 463 139d 13bc 493 49b 4aa 13df 13e4 4bc 13f2 4c9 4d1 140b 1459 k : nat
Ο(n.+1 ) <= k.+1 + Ο(N.+1 ).-1
by rewrite addSnnS prednK // leq_addl.
Qed .
Lemma gdist_rhanoi4 (n : nat) (p1 p2 : peg 4 ) :
p1 != p2 -> `d[`c[p1, n], `c[p2, n]]_rmove = Ο(n).4 p1 != p2 -> `d[`c[p1 , n], `c[p2 , n]]_rmove = Ο(n)
Proof .14c1
by move => p1Dp2; apply /eqP; rewrite eqn_leq gdist_leq // gdist_geq.
Qed .
End Hanoi4 .