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 star gdist lhanoi3 ghanoi ghanoi4 shanoi.
From mathcomp Require Import zify.
Open Scope nat_scope.
Set Implicit Arguments .
Unset Strict Implicit .
(******************************************************************************)
(* *)
(* This file proves the formula that gives the distance between two perfect *)
(* configurations for the star puzzle. It follows the proof given by Thierry *)
(* Bousch in La tour de Stockmeyer *)
(* *)
(* *)
(******************************************************************************)
Ltac Zify .zify_post_hook ::=
zify_ssreflect.SsreflectZifyInstances.divZ_modZ_to_equations.
Section sHanoi4 .
Local Notation "c1 `-->_s c2" := (smove c1 c2)
(format "c1 `-->_s c2" , at level 60 ).
Local Notation "c1 `-->*_s c2" := (connect smove c1 c2)
(format "c1 `-->*_s c2" , at level 60 ).
(* the peg at the center is 0 *)
Let p0 : peg 4 := ord0.
(* specialize version *)
Lemma pE4 (p1 p2 p3 : peg 4 ) p :
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
[\/ p = p0, p = p1, p = p2 | p = p3].p0 := ord0 : peg 4
p1, p2, p3, p : peg 4
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 -> [\/ p = p0, p = p1, p = p2 | p = p3]
Proof .2
rewrite /p0.4 p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != ord0 ->
p2 != ord0 ->
p3 != ord0 -> [\/ p = ord0, p = p1, p = p2 | p = p3]
by case : (peg4E p1) => ->; rewrite ?eqxx //;
case : (peg4E p2) => ->; rewrite ?eqxx //;
case : (peg4E p3) => ->; rewrite ?eqxx //;
case : (peg4E p) => ->; rewrite ?eqxx // => *;
try ((by apply : Or41) || (by apply : Or42) ||
(by apply : Or43) || (by apply : Or44)).
Qed .
(* Lifting lhanoi3 to shanoi4 *)
Section lift .
Variable p1 p2 p3 : peg 4 .
Hypothesis p1Dp0 : p1 != p0.
Hypothesis p2Dp0 : p2 != p0.
Hypothesis p3Dp0 : p3 != p0.
Hypothesis p1Dp2 : p1 != p2.
Hypothesis p1Dp3 : p1 != p3.
Hypothesis p2Dp3 : p2 != p3.
Variable n m : nat.
Definition clmap (c : configuration 3 n) : configuration 4 n :=
[ffun i =>
if c i == 0 :> nat then p1
else if c i == 1 :> nat then p0 else p2].
Definition clmerge (c : configuration 3 n) : configuration 4 (n + m) :=
cmerge (clmap c) `c[p3].
Lemma on_top_clmerge x c : on_top x c -> on_top (tlshift m x) (clmerge c).5 p1, p2, p3 : peg 4
p1Dp0 : p1 != p0
p2Dp0 : p2 != p0
p3Dp0 : p3 != p0
p1Dp2 : p1 != p2
p1Dp3 : p1 != p3
p2Dp3 : p2 != p3
n, m : nat
x : disk n
c : configuration 3 n
on_top (q:=3 ) (n:=n) x c ->
on_top (q:=4 ) (n:=n + m) (tlshift m x) (clmerge c)
Proof .e
move => /on_topP oH; apply /on_topP => d.5 11 12 13 14 15 16 17 18 19 1a oH : forall d1 : ordinal_finType n,
c x = c d1 -> x <= d1
d : ordinal_finType (n + m)
clmerge c (tlshift m x) = clmerge c d ->
tlshift m x <= d
rewrite !ffunE tsplit_tlshift /=.20 clmap c x =
match tsplit d with
| inl j => clmap c j
| inr j => `c[p3] j
end -> x + m <= d
case : tsplitP => y; rewrite !ffunE => ->.5 11 12 13 14 15 16 17 18 19 1a 21 22 y : 'I_m
(if c x == 0 then p1 else if c x == 1 then p0 else p2) =
p3 -> x + m <= y
case : (_ == _) => [/eqP|]; first by rewrite (negPf p1Dp3).2b (if c x == 1 then p0 else p2) = p3 -> x + m <= y
2e
case : (_ == _) => /eqP; first by rewrite eq_sym (negPf p3Dp0).2b p2 == p3 -> x + m <= y
2e
by rewrite (negPf p2Dp3).
case : eqP => [cxE0|cxD0].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 cxE0 : c x = 0
p1 =
(if c y == 0 then p1 else if c y == 1 then p0 else p2) ->
x + m <= y + m
case : eqP => [cyE0 _| _].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 42 cyE0 : c y = 0
x + m <= y + m
by rewrite leq_add2r oH //; apply : val_inj; rewrite /= cyE0.
by case : (_ == _) => /eqP; rewrite (negPf p1Dp0, negPf p1Dp2).
case : eqP => [cxE1|cxD1].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 47 cxE1 : c x = 1
p0 =
(if c y == 0 then p1 else if c y == 1 then p0 else p2) ->
x + m <= y + m
case : (_ == _) => [/eqP|]; first by rewrite eq_sym (negPf p1Dp0).5b p0 = (if c y == 1 then p0 else p2) -> x + m <= y + m
5e
case : eqP => [cyE1 _|_ /eqP].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 47 5c cyE1 : c y = 1
4e
by rewrite leq_add2r oH //; apply : val_inj; rewrite /= cyE1.
by rewrite eq_sym (negPf p2Dp0).
have cxE2 : c x = 2 :> nat by case : (c x) cxD0 cxD1 => [] [|[|[]]].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 47 61 cxE2 : c x = 2
62
case : eqP => [_ /eqP|cyD0].78 p2 == p1 -> x + m <= y + m
by rewrite eq_sym (negPf p1Dp2).
case : eqP => [_ /eqP|cyD1 _].80 p2 == p0 -> x + m <= y + m
by rewrite (negPf p2Dp0).
have cyE2 : c y = 2 :> nat by case : (c y) cyD0 cyD1 => [] [|[|[]]].5 11 12 13 14 15 16 17 18 19 1a 21 22 31 47 61 79 81 8d cyE2 : c y = 2
4e
by rewrite leq_add2r oH //; apply : val_inj; rewrite /= cyE2.
Qed .
Lemma move_clmerge c1 c2 : lmove c1 c2 -> clmerge c1 `-->_s clmerge c2.5 11 12 13 14 15 16 17 18 c1, c2 : configuration 3 n
lmove c1 c2 -> clmerge c1 `-->_s clmerge c2
Proof .97
move => /moveP [d1 [H1d1 H2d1 H3d1 H4d1]].5 11 12 13 14 15 16 17 18 9a d1 : ordinal_finType n
H1d1 : lrel (n:=3 ) (c1 d1) (c2 d1)
H2d1 : forall d2 : ordinal_finType n,
d1 != d2 -> c1 d2 = c2 d2
H3d1 : on_top (q:=3 ) (n:=n) d1 c1
H4d1 : on_top (q:=3 ) (n:=n) d1 c2
clmerge c1 `-->_s clmerge c2
apply /moveP; exists (tlshift m d1 ); split => //.a0 srel (n:=4 ) (clmerge c1 (tlshift m d1))
(clmerge c2 (tlshift m d1))
- a8
move : H1d1; rewrite !ffunE tsplit_tlshift !ffunE.5 11 12 13 14 15 16 17 18 9a a1 a3 a4 a5
lrel (n:=3 ) (c1 d1) (c2 d1) ->
srel (n:=4 )
(if c1 d1 == 0
then p1
else if c1 d1 == 1 then p0 else p2)
(if c2 d1 == 0
then p1
else if c2 d1 == 1 then p0 else p2)
ab
rewrite /lrel /= /srel /ghanoi.srel /=.b6 ((c1 d1).+1 == c2 d1) || ((c2 d1).+1 == c1 d1) ->
((if c1 d1 == 0
then p1
else if c1 d1 == 1 then p0 else p2)
!= (if c2 d1 == 0
then p1
else if c2 d1 == 1 then p0 else p2)) &&
((if c1 d1 == 0
then p1
else if c1 d1 == 1 then p0 else p2) *
(if c2 d1 == 0
then p1
else if c2 d1 == 1 then p0 else p2) == 0 )
ab
case : (c1 d1) => [] [|[|[|]]] //=.b6 0 < 3 ->
(1 == c2 d1) || ((c2 d1).+1 == 0 ) ->
(p1
!= (if c2 d1 == 0
then p1
else if c2 d1 == 1 then p0 else p2)) &&
(p1 *
(if c2 d1 == 0
then p1
else if c2 d1 == 1 then p0 else p2) == 0 )
- bd
case : (c2 d1) => [] [|[|[|]]] //=.b6 1 < 3 -> 0 < 3 -> true -> (p1 != p0) && (p1 * 0 == 0 )
c0
by rewrite p1Dp0 muln0.
- cb
case : (c2 d1) => [] [|[|[|]]] //= _ _ _.b6 (p0 != p1) && (0 * p1 == 0 )
by rewrite eq_sym p1Dp0.
by rewrite eq_sym p2Dp0.
case : (c2 d1) => [] [|[|[|]]] //= _ _ _.b6 (p2 != p0) && (p2 * 0 == 0 )
ab
by rewrite p2Dp0 muln0.
- e1
move => d2; rewrite !ffunE; case : tsplitP => j; rewrite !ffunE //.5 11 12 13 14 15 16 17 18 9a a1 a2 a3 a4 a5 d2 : ordinal_finType (n + m)
j : 'I_n
d2 = j + m ->
tlshift m d1 != d2 ->
(if c1 j == 0
then p1
else if c1 j == 1 then p0 else p2) =
(if c2 j == 0
then p1
else if c2 j == 1 then p0 else p2)
e3
move => d2E /eqP/val_eqP.5 11 12 13 14 15 16 17 18 9a a1 a2 a3 a4 a5 e9 ea d2E : d2 = j + m
val (tlshift m d1) != val d2 ->
(if c1 j == 0
then p1
else if c1 j == 1 then p0 else p2) =
(if c2 j == 0
then p1
else if c2 j == 1 then p0 else p2)
e3
rewrite /= d2E eqn_add2r => H.5 11 12 13 14 15 16 17 18 9a a1 a2 a3 a4 a5 e9 ea f0 H : d1 != j
(if c1 j == 0
then p1
else if c1 j == 1 then p0 else p2) =
(if c2 j == 0
then p1
else if c2 j == 1 then p0 else p2)
e3
by rewrite (@H2d1 j).
- f9
by apply : on_top_clmerge.
by apply : on_top_clmerge.
Qed .
Lemma path_clmerge c cs :
path (move (@lrel 3 )) c cs ->
path smove (clmerge c) [seq clmerge c | c <- cs].5 11 12 13 14 15 16 17 18 1a cs : seq (configuration 3 n)
path (move (q:=3 ) (lrel (n:=3 ))) c cs ->
path smove (clmerge c) [seq clmerge c | c <- cs]
Proof .101
elim : cs c => //= c1 cs IH c2 /andP[mH pH].5 11 12 13 14 15 16 17 18 c1 : configuration 3 n
104 IH : forall c : configuration 3 n,
path (move (q:=3 ) (lrel (n:=3 ))) c cs ->
path smove (clmerge c)
[seq clmerge c0 | c0 <- cs]
c2 : configuration 3 n
mH : move (q:=3 ) (lrel (n:=3 )) c2 c1
pH : path (move (q:=3 ) (lrel (n:=3 ))) c1 cs
(clmerge c2 `-->_s clmerge c1) &&
path smove (clmerge c1) [seq clmerge c | c <- cs]
by rewrite move_clmerge // IH.
Qed .
Lemma gdist_clmerge c1 c2 :
`d[clmerge c1, clmerge c2]_smove <= `d[c1, c2]_(move (@lrel 3 )).99 `d[clmerge c1, clmerge c2]_smove <=
`d[c1, c2]_(move (q:=3 ) (lrel (n:=3 )))
Proof .112
have /gpath_connect[pa1 pa1H] := move_lconnect3 c1 c2.5 11 12 13 14 15 16 17 18 9a pa1 : seq
(finfun_finType (ordinal_finType n)
(ordinal_finType 3 ))
pa1H : gpath lmove c1 c2 pa1
114
rewrite (gpath_dist pa1H) -(size_map clmerge).119 `d[clmerge c1, clmerge c2]_smove <=
size [seq clmerge i | i <- pa1]
apply : gdist_path_le; first by rewrite path_clmerge // (gpath_path pa1H).119 last (clmerge c1) [seq clmerge i | i <- pa1] =
clmerge c2
by rewrite [LHS]last_map (gpath_last pa1H).
Qed .
End lift .
(* We first prove the lower bound *)
Lemma leq_shanoi4 p1 p2 n :
p1 != p0 -> p2 != p0 -> p1 != p2 ->
`d[`c[p1, n],`c[p2, n]]_smove <= (S_[1 ] n).*2 .5 p1, p2 : ordinal_eqType 4
n : nat
p1 != p0 ->
p2 != p0 ->
p1 != p2 ->
`d[`c[p1 , n], `c[p2 , n]]_smove <= (S_[1 ] n).*2
Proof .125
elim /ltn_ind : n p1 p2 => [] [|n] IH p1 p2 p1Dp0 p2Dp0 p1Dp2.5 IH : forall m : nat,
m < 0 ->
forall p1 p2 : ordinal_eqType 4 ,
p1 != p0 ->
p2 != p0 ->
p1 != p2 ->
`d[`c[p1], `c[p2]]_smove <= (S_[1 ] m).*2
128 12 13 15 `d[`c[p1], `c[p2]]_smove <= (S_[1 ] 0 ).*2
rewrite alphaS_small double0.12f `d[`c[p1], `c[p2]]_smove <= 0
132
rewrite (_ : `c[p1] = `c[p2]) ?gdist0 //.
by apply /ffunP=> [] [].
rewrite S1E S1_bigmin -muln2 -bigminMr.134 `d[`c[p1], `c[p2]]_smove <=
\min_(i <= n) ((S1 i).*2 + ((3 ^ (n.+1 - i)).-1 )./2 ) *
2
apply /bigmin_leqP => i iLn.5 129 135 128 12 13 15 i : nat
iLn : i <= n
`d[`c[p1], `c[p2]]_smove <=
((S1 i).*2 + ((3 ^ (n.+1 - i)).-1 )./2 ) * 2
have iLn1 : i <= n.+1 by apply : leq_trans iLn _.5 129 135 128 12 13 15 14a 14b iLn1 : i <= n.+1
14c
rewrite -{-5 }(subnK iLn1).14e
rewrite eq_sym in p2Dp0.5 129 135 128 12 15 14a 14b 151 p2Dp0 : p0 != p2
14c
have [p3 [[p3Dp2 p3Dp0 p3Dp1] _]] := peg4comp3 p1Dp0 p1Dp2 p2Dp0.5 129 135 128 12 15 14a 14b 151 157 p3 : peg 4
p3Dp2 : p3 != p2
14 p3Dp1 : p3 != p1
14c
rewrite eq_sym in p2Dp0.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13
14c
pose p1n := `c[p1, n.+1 - i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 p1n := `c[p1 , n.+1 - i] : configuration 4 (n.+1 - i)
14c
pose p2n := `c[p2, n.+1 - i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 p2n := `c[p2 , n.+1 - i] : configuration 4 (n.+1 - i)
14c
pose p3n := `c[p3, n.+1 - i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c p3n := `c[p3 , n.+1 - i] : configuration 4 (n.+1 - i)
14c
pose p1i := `c[p1, i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 p1i := `c[p1 , i] : configuration 4 i
14c
pose p2i := `c[p2, i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 p2i := `c[p2 , i] : configuration 4 i
14c
pose p3i := `c[p3, i].5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b p3i := `c[p3 , i] : configuration 4 i
14c
pose c1 := cmerge p1n p1i.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 c1 := cmerge (q:=4 ) (m:=n.+1 - i) (n:=i) p1n p1i : {ffun forall x : ordinal_finType (n.+1 - i + i),
(fun => peg 4 ) x}
14c
pose c2 := cmerge p1n p3i.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 185 c2 := cmerge (q:=4 ) (m:=n.+1 - i) (n:=i) p1n p3i : {ffun forall x : ordinal_finType (n.+1 - i + i),
(fun => peg 4 ) x}
14c
pose c3 := cmerge p2n p3i.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 185 18a c3 := cmerge (q:=4 ) (m:=n.+1 - i) (n:=i) p2n p3i : {ffun forall x : ordinal_finType (n.+1 - i + i),
(fun => peg 4 ) x}
14c
pose c4 := cmerge p2n p2i.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 185 18a 18f c4 := cmerge (q:=4 ) (m:=n.+1 - i) (n:=i) p2n p2i : {ffun forall x : ordinal_finType (n.+1 - i + i),
(fun => peg 4 ) x}
14c
have <- : c1 = `c[p1].
apply /ffunP => j; rewrite /c1 !ffunE.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 185 18a 18f 194 j : ordinal_finType (n.+1 - i + i)
match tsplit j with
| inl j => p1n j
| inr j => p1i j
end = p1
199
by case : tsplitP => k; rewrite !ffunE.
have <- : c4 = `c[p2].
apply /ffunP => j; rewrite /c1 !ffunE.19f match tsplit j with
| inl j => p2n j
| inr j => p2i j
end = p2
1a9
by case : tsplitP => k; rewrite !ffunE.
apply : leq_trans
(_ : _ <= `d[c1, c2]_smove + `d[c2, c3]_smove + `d[c3, c4]_smove) _.193 `d[c1, c4]_smove <=
`d[c1, c2]_smove + `d[c2, c3]_smove + `d[c3, c4]_smove
apply : leq_trans (leq_add (gdist_triangular _ _ _ _) (leqnn _)).193 `d[c1, c4]_smove <=
`d[c1, c3]_smove + `d[c3, c4]_smove
1b7
apply : gdist_triangular.
rewrite -addnn !mulnDl [X in _ <= X]addnAC !muln2.193 `d[c1, c2]_smove + `d[c2, c3]_smove + `d[c3, c4]_smove <=
(S1 i).*2 + (((3 ^ (n.+1 - i)).-1 )./2 ).*2 + (S1 i).*2
repeat apply : leq_add; first 2 last .193 `d[c3, c4]_smove <= (S1 i).*2
- 1c6
apply : leq_trans (gdist_merger _ _ _) _; first by apply : sirr.193 connect (move (q:=4 ) (srel (n:=4 ))) p3i p2i
by apply : shanoi_connect.
by rewrite -S1E; apply : IH.
- 1da
apply : leq_trans (gdist_merger _ _ _) _; first by apply : sirr.193 connect (move (q:=4 ) (srel (n:=4 ))) p1i p3i
by apply : shanoi_connect.
by rewrite -S1E; apply : IH => //; rewrite eq_sym.
rewrite div2K; last first .193 ~~ odd (3 ^ (n.+1 - i)).-1
rewrite -subn1 oddB ?expn_gt0 // addbT.193 ~~ ~~ odd (3 ^ (n.+1 - i))
1ef
by rewrite oddX orbT.
have -> : c2 = clmerge p1 p2 p3 _ `c[ord0].193 c2 = clmerge p1 p2 p3 (n:=n.+1 - i) i `c[ord0]
apply /ffunP=> x; rewrite !ffunE.5 129 135 128 12 15 14a 14b 151 15c 15d 14 15e 13 167 16c 171 176 17b 180 185 18a 18f 194 x : ordinal_finType (n.+1 - i + i)
match tsplit x with
| inl j => p1n j
| inr j => p3i j
end =
match tsplit x with
| inl j => clmap p1 p2 (n:=n.+1 - i) `c[ord0] j
| inr j => `c[p3] j
end
1fd
by case : tsplitP => // j; rewrite !ffunE /=.
have -> : c3 = clmerge p1 p2 p3 _ `c[inord 2 ].193 c3 = clmerge p1 p2 p3 (n:=n.+1 - i) i `c[inord 2 ]
apply /ffunP=> x; rewrite !ffunE.203 match tsplit x with
| inl j => p2n j
| inr j => p3i j
end =
match tsplit x with
| inl j => clmap p1 p2 (n:=n.+1 - i) `c[inord 2 ] j
| inr j => `c[p3] j
end
20d
by case : tsplitP => // j; rewrite !ffunE /= inordK.193 `d[clmerge p1 p2 p3 (n:=n.+1 - i) i `c[ord0], clmerge
p1 p2
p3
(n:=
n.+1 -
i) i
`c[
inord
2 ]]_smove <=
(3 ^ (n.+1 - i)).-1
apply : leq_trans (gdist_clmerge _ _ _ _ _ _ _ _ _) _ => //;
try by rewrite eq_sym.193 `d[`c[ord0], `c[inord 2 ]]_(move (q:=3 ) (lrel (n:=3 ))) <=
(3 ^ (n.+1 - i)).-1
rewrite gdist_lhanoi3p /lrel /= inordK //=.193 (3 ^ (n.+1 - i)).-1 * (ord0 != inord 2 ) <=
(3 ^ (n.+1 - i)).-1
case : eqP=> [/val_eqP/=|]; first by rewrite inordK.193 ord0 <> inord 2 ->
(3 ^ (n.+1 - i)).-1 * ~~ false <= (3 ^ (n.+1 - i)).-1
by rewrite muln1.
Qed .
(* *)
(* Distance for a list *)
Fixpoint distanceL n (l : seq (configuration 4 n)) : nat :=
if l is a :: l1 then
if l1 is b :: _ then `d[a, b]_smove + distanceL l1
else 0
else 0 .
Notation " D[ l ] " := (distanceL l)
(format " D[ l ]" ).
(* Alternating peg : depending on the parity of n it is p1 or p2 *)
Definition apeg p1 p2 n : peg 4 := if odd n then p2 else p1.
Notation " a[ p1 , p2 ] " := (apeg p1 p2)
(format " a[ p1 , p2 ]" ).
Lemma apeg32E a p1 p2 : a[p1, p2] (3 * a).-2 = a[p1, p2] a. a[p1, p2] (3 * a).-2 = a[p1, p2] a
Proof .225
case : a => // a.5 229 228
a[p1, p2] (3 * a.+1 ).-2 = a[p1, p2] a.+1
rewrite /apeg -subn2 oddB; last by rewrite mulnS.22f (if odd (3 * a.+1 ) (+) odd 2 then p2 else p1) =
(if odd a.+1 then p2 else p1)
by rewrite oddM /=; case : odd.
Qed .
Lemma apeg0 p1 p2 : a[p1, p2] 0 = p1.
Proof .236
by []. Qed .
Lemma apegS p1 p2 n : a[p1, p2] n.+1 = a[p2, p1] n.5 229 129
a[p1, p2] n.+1 = a[p2, p1] n
Proof .23c
by rewrite /apeg /=; case : odd. Qed .
Lemma apegO p1 p2 n : a[p1, p2] n = a[p2, p1] (~~ (odd n)).23e a[p1, p2] n = a[p2, p1] (~~ odd n)
Proof .242
by rewrite /apeg /=; case : odd. Qed .
Lemma apeg_double p1 p2 n : a[p1, p2] (n.*2 ) = p1.
Proof .247
by rewrite apegO odd_double. Qed .
Lemma apeg_neq p1 p2 p3 n : p1 != p3 -> p2 != p3 -> a[p1, p2] n != p3.5 p1, p2, p3 : ordinal_eqType 4
129 p1 != p3 -> p2 != p3 -> a[p1, p2] n != p3
Proof .24c
by rewrite /apeg /=; case : odd; rewrite // eq_sym. Qed .
Lemma apeg_eqC p1 p2 n : (a[p1, p2] n == a[p2, p1] n) = (p1 == p2).23e ( a[p1, p2] n == a[p2, p1] n) = (p1 == p2)
Proof .253
by rewrite /apeg /=; case : odd; rewrite // eq_sym. Qed .
Lemma apegD p1 p2 m n : a[p1, p2] (m + n) = a[ a[p1, p2] n, a[p2, p1] n] m. a[p1, p2] (m + n) = a[ a[p1, p2] n, a[p2, p1] n] m
Proof .258
by rewrite /apeg oddD; do 2 case : odd. Qed .
Lemma apegMr p1 p2 m n : odd m -> a[p1, p2] (m * n) = a[p1, p2] n.25a odd m -> a[p1, p2] (m * n) = a[p1, p2] n
Proof .25f
by rewrite /apeg; rewrite oddM => ->. Qed .
Lemma codom_apeg (A : finType) (f : {ffun A -> _}) p1 p2 n :
(codom f \subset [:: a[p1, p2] n; a[p2, p1] n]) =
(codom f \subset [:: p1; p2]).5 A : finType
f : {ffun A -> ordinal_finType 4 }
229 129 (codom f \subset [:: a[p1, p2] n; a[p2, p1] n]) =
(codom f \subset [:: p1; p2])
Proof .264
by rewrite /apeg; case : odd; rewrite // codom_subC. Qed .
(* This is lemma 2.1 *)
Lemma sgdist_pair n (p2 : peg 4 ) (u v : configuration 4 n.+1 )
(p1 := u ldisk) (p3 := v ldisk):
{st : (configuration 4 n * configuration 4 n) |
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3], codom st.2 \subset [:: p1; p2] &
`d[u, v]_smove = D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}.5 129 p2 : peg 4
u, v : configuration 4 n.+1
p1 := u ldisk : peg 4
p3 := v ldisk : peg 4
{st : configuration 4 n * configuration 4 n
| p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
Proof .26c
case : eqP => [_|/eqP p1Dp2]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15
{st : configuration 4 n * configuration 4 n
| ~~ false ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
case : eqP => [_|/eqP p1Dp3]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15 16
{st : configuration 4 n * configuration 4 n
| ~~ false ->
~~ false ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
case : eqP => [_|/eqP p2Dp3]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15 16 17
{st : configuration 4 n * configuration 4 n
| ~~ false ->
~~ false ->
~~ false ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
case : eqP => [_|/eqP p1Dp0]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15 16 17 12
{st : configuration 4 n * configuration 4 n
| ~~ false ->
~~ false ->
~~ false ->
~~ false ->
p2 != p0 ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
case : eqP => [_|/eqP p2Dp0]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15 16 17 12 13
{st : configuration 4 n * configuration 4 n
| ~~ false ->
~~ false ->
~~ false ->
~~ false ->
~~ false ->
p3 != p0 ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
case : eqP => [_|/eqP p3Dp0]; first by exists (↓[u], ↓[v]).5 129 26f 270 271 272 15 16 17 12 13 14
{st : configuration 4 n * configuration 4 n
| ~~ false ->
~~ false ->
~~ false ->
~~ false ->
~~ false ->
~~ false ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; st.1 ; st.2 ; ↓[v]]].+2 ]}
have pE p : [\/ p = p0, p = p1, p = p2 | p = p3] by apply : pE4.5 129 26f 270 271 272 15 16 17 12 13 14 pE : forall p : peg 4 ,
[\/ p = p0, p = p1, p = p2 | p = p3]
292
have [cs /= csH] := gpath_connect (shanoi_connect u v).5 129 26f 270 271 272 15 16 17 12 13 14 297 cs : seq
(finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ))
csH : gpath smove u v cs
{st : configuration 4 n * configuration 4 n
| true ->
true ->
true ->
true ->
true ->
true ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
(`d[↓[u], st.1 ]_smove +
(`d[st.1 , st.2 ]_smove +
(`d[st.2 , ↓[v]]_smove + 0 ))).+2 ]}
have vIcs : v \in cs.
have := mem_last u cs; rewrite (gpath_last csH).29b v \in u :: cs -> v \in cs
2a3
rewrite inE; case : eqP => // vEu.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d vEu : v = u
true || (v \in cs) -> v \in cs
2a3
by case /eqP : p1Dp3; rewrite /p3 vEu.
case : (@split_first _ cs (fun c => c ldisk != p1)) => [|[[sp cs1] cs2]].2a5 ~~
all
[predC fun
c : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) => c ldisk != p1]
cs
apply /negP=> /allP /(_ _ vIcs).2a5 [predC fun
c : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) => c ldisk != p1] v ->
False
2b8
rewrite /= -topredE /= negbK.2a5 v ldisk == p1 -> False
2b8
by rewrite eq_sym (negPf p1Dp3).2ba [/\ all
[predC fun
c : finfun_finType
(ordinal_finType n.+1 )
(ordinal_finType 4 ) =>
c ldisk != p1] (sp, cs1, cs2).1 .2 ,
(sp, cs1, cs2).1 .1 ldisk != p1
& cs =
(sp, cs1, cs2).1 .2 ++
(sp, cs1, cs2).1 .1 :: (sp, cs1, cs2).2 ] ->
{st : configuration 4 n * configuration 4 n
| true ->
true ->
true ->
true ->
true ->
true ->
[/\ codom st.1 \subset [:: p2; p3],
codom st.2 \subset [:: p1; p2]
& `d[u, v]_smove =
(`d[↓[u], st.1 ]_smove +
(`d[st.1 , st.2 ]_smove +
(`d[st.2 , ↓[v]]_smove + 0 ))).+2 ]}
case => /allP spH spLE csE.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc spH : {in (sp, cs1, cs2).1 .2 ,
forall
x : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ),
[predC fun
c : finfun_finType
(ordinal_finType n.+1 )
(ordinal_finType 4 ) =>
c ldisk != p1] x}
spLE : (sp, cs1, cs2).1 .1 ldisk != p1
csE : cs =
(sp, cs1, cs2).1 .2 ++
(sp, cs1, cs2).1 .1 :: (sp, cs1, cs2).2
29e
pose s := last u cs1.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 s := last u cs1: configuration 4 n.+1
29e
have sMsp : s `-->_s sp.
by have := gpath_path csH; rewrite csE cat_path => /and3P[].
have sLp1 : s ldisk = p1.
move : (spH s); rewrite /s; case : (cs1) => //= c cs3 /(_ (mem_last _ _)).5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd c : {ffun 'I_n.+1 -> 'I_4}
cs3 : seq {ffun 'I_n.+1 -> 'I_4}
last c cs3
\notin (fun c : {ffun 'I_n.+1 -> 'I_4} =>
c ldisk != p1) -> last c cs3 ldisk = p1
2e5
by rewrite -topredE negbK => /eqP.
have spLp0 : sp ldisk = p0.
apply /eqP.
have /(_ ldisk) := move_diskr sMsp.2e7 (s ldisk != sp ldisk ->
srel (n:=4 ) (s ldisk) (sp ldisk)) -> sp ldisk == p0
2f7
rewrite eq_sym sLp1 => /(_ spLE) /andP[].2e7 p1 != sp ldisk -> p1 * sp ldisk == 0 -> sp ldisk == p0
2f7
case : (_ =P p0) => // /val_eqP /=.2e7 sp ldisk != 0 ->
p1 != sp ldisk -> p1 * sp ldisk == 0 -> false
2f7
have /eqP/val_eqP/= := p1Dp0.2e7 p1 != 0 ->
sp ldisk != 0 ->
p1 != sp ldisk -> p1 * sp ldisk == 0 -> false
2f7
by case : (p1 : nat) => // k; case : (sp _ : nat).
have sCd : codom (↓[s]) \subset [:: p2; p3].2f9 codom ↓[s] \subset [:: p2; p3]
apply /subsetP=> i; rewrite !inE => /codomP[j] ->.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa i : ordinal_finType 4
j : ordinal_finType n
(↓[s] j == p2) || (↓[s] j == p3)
316
case : (pE (↓[s] j)) => [||->|->]; rewrite ?eqxx ?orbT //.31d ↓[s] j = p0 -> (↓[s] j == p2) || (↓[s] j == p3)
rewrite ffunE trshift_lift /=.31d s (lift ord_max j) = p0 ->
(s (lift ord_max j) == p2)
|| (s (lift ord_max j) == p3)
325
move /eqP; rewrite -spLp0 -[_ == _]negbK; case /negP.31d s (lift ord_max j) != sp ldisk
325
apply : move_on_toplDr sMsp _ _; first by rewrite sLp1 spLp0.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2e8 2fa 31e 31f
lift ord_max j <= ldisk
325
by rewrite /= /bump [n <= j]leqNgt ltn_ord add0n ltnW.
rewrite ffunE trshift_lift /=.31d s (lift ord_max j) = p1 ->
(s (lift ord_max j) == p2)
|| (s (lift ord_max j) == p3)
316
move /eqP; rewrite -sLp1 -[_ == _]negbK; case /negP.31d s (lift ord_max j) != s ldisk
316
apply : move_on_toplDl sMsp _ _; first by rewrite sLp1 spLp0.333 lift ord_max j < ldisk
316
by rewrite /= /bump [n <= j]leqNgt ltn_ord add0n.
have vIcs2 : v \in cs2.
move : vIcs; rewrite csE !(inE, mem_cat) => /or3P[|/eqP vEs|] //.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319
v \in (sp, cs1, cs2).1 .2 -> v \in cs2
by move => /spH; rewrite /= -topredE negbK eq_sym (negPf p1Dp3).
by case /eqP : p3Dp0; rewrite /p3 vEs.
case : (@split_last _ (sp :: cs2) (fun c => c ldisk != p3)) =>
[|/= [[t cs3] cs4]/=].34d ~~
all
[predC fun
c : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) => c ldisk != p3]
(sp :: cs2)
apply /negP=> /allP /(_ _ (mem_head _ _)).34d [predC fun
c : finfun_finType (ordinal_finType n.+1 )
(ordinal_finType 4 ) => c ldisk != p3]
sp -> False
362
by rewrite /= -topredE /= negbK spLp0 eq_sym (negPf p3Dp0).
case => // tLE tH scs2E.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 366 tLE : t ldisk != p3
tH : all
[predC fun c : {ffun 'I_n.+1 -> 'I_4} =>
c ldisk != p3] cs4
scs2E : sp :: cs2 = cs3 ++ t :: cs4
29e
have vIcs4 : v \in cs4.
have := gpath_last csH; rewrite csE scs2E !last_cat /=.372 last t cs4 = v -> v \in cs4
37a
case : (cs4) => /= [tEv|c1 cs5 <-]; last by apply : mem_last.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 366 373 374 375 tEv : t = v
v \in [::]
37a
by case /eqP: tLE; rewrite tEv.
case : cs4 tH scs2E vIcs4 => // tp cs4 /allP tH scs2E vItpcs4.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 tp : {ffun 'I_n.+1 -> 'I_4}
cs4 : seq {ffun 'I_n.+1 -> 'I_4}
tH : {in tp :: cs4,
forall
x : finfun_eqType (ordinal_finType n.+1 )
(ordinal_eqType 4 ),
[predC fun c : {ffun 'I_n.+1 -> 'I_4} =>
c ldisk != p3] x}
scs2E : sp :: cs2 = cs3 ++ [:: t, tp & cs4]
vItpcs4 : v \in tp :: cs4
29e
have tMtp : t `-->_s tp.
by have := gpath_path csH; rewrite csE scs2E !cat_path /= => /and5P[].
have tpLp3 : tp ldisk = p3.
by move : (tH _ (mem_head _ _)); rewrite /= -topredE negbK => /eqP.
have tLp0 : t ldisk = p0.
apply /eqP.
have /(_ ldisk) := move_diskr tMtp.3a5 (t ldisk != tp ldisk ->
srel (n:=4 ) (t ldisk) (tp ldisk)) -> t ldisk == p0
3ae
rewrite tpLp3 => /(_ tLE) /andP[].3a5 t ldisk != p3 -> t ldisk * p3 == 0 -> t ldisk == p0
3ae
case : (_ =P p0) => // /val_eqP /=.3a5 t ldisk != 0 ->
t ldisk != p3 -> t ldisk * p3 == 0 -> false
3ae
have /eqP/val_eqP/= := p3Dp0.3a5 p3 != 0 ->
t ldisk != 0 ->
t ldisk != p3 -> t ldisk * p3 == 0 -> false
3ae
by case : (p3 : nat) => // k; case : (t _ : nat).
have tCd : codom (↓[t]) \subset [:: p1; p2].3b0 codom ↓[t] \subset [:: p1; p2]
apply /subsetP=> i; rewrite !inE => /codomP[j] ->.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 31e 31f
(↓[t] j == p1) || (↓[t] j == p2)
3cd
case : (pE (↓[t] j)) => [|->|->|]; rewrite ?eqxx ?orbT //.3d4 ↓[t] j = p0 -> (↓[t] j == p1) || (↓[t] j == p2)
rewrite ffunE trshift_lift /=.3d4 t (lift ord_max j) = p0 ->
(t (lift ord_max j) == p1)
|| (t (lift ord_max j) == p2)
3da
move /eqP; rewrite -tLp0 -[_ == _]negbK; case /negP.3d4 t (lift ord_max j) != t ldisk
3da
apply : move_on_toplDl tMtp _ _; first by rewrite tpLp3 tLp0 eq_sym.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 3a6 3b1 31e 31f
343 3da
by rewrite /= /bump [n <= j]leqNgt ltn_ord add0n.
rewrite ffunE trshift_lift /=.3d4 t (lift ord_max j) = p3 ->
(t (lift ord_max j) == p1)
|| (t (lift ord_max j) == p2)
3cd
move /eqP; rewrite -tpLp3 -[_ == _]negbK; case /negP.3d4 t (lift ord_max j) != tp ldisk
3cd
apply : move_on_toplDr tMtp _ _; first by rewrite tpLp3 tLp0 eq_sym.
by rewrite /= /bump [n <= j]leqNgt ltn_ord add0n ltnW.
exists (↓[s], ↓[t]); split => //=.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 29d 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 H, H0, H1, H2, H3, H4 : true
`d[u, v]_smove =
(`d[↓[u], ↓[s]]_smove +
(`d[↓[s], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove + 0 ))).+2
rewrite addn0.3fd `d[u, v]_smove =
(`d[↓[u], ↓[s]]_smove +
(`d[↓[s], ↓[t]]_smove + `d[↓[t], ↓[v]]_smove)).+2
move : csH; rewrite csE => csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe csH : gpath smove u v
((sp, cs1, cs2).1 .2 ++
(sp, cs1, cs2).1 .1 :: (sp, cs1, cs2).2 )
403
rewrite (gdist_cat csH) -/s.407 `d[u, s]_smove + `d[s, v]_smove =
(`d[↓[u], ↓[s]]_smove +
(`d[↓[s], ↓[t]]_smove + `d[↓[t], ↓[v]]_smove)).+2
move : csH => /gpath_catr; rewrite -/s => csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe csH : gpath smove s v
((sp, cs1, cs2).1 .1 :: (sp, cs1, cs2).2 )
40c
rewrite gdist_cunlift_eq //; try apply : sirr; last by apply : shanoi_connect.410 `d[↓[u], ↓[s]]_(move (q:=4 ) (srel (n:=4 ))) +
`d[s, v]_smove =
(`d[↓[u], ↓[s]]_smove +
(`d[↓[s], ↓[t]]_smove + `d[↓[t], ↓[v]]_smove)).+2
rewrite -!addnS.410 `d[↓[u], ↓[s]]_(move (q:=4 ) (srel (n:=4 ))) +
`d[s, v]_smove =
`d[↓[u], ↓[s]]_smove +
(`d[↓[s], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove).+2 )
congr (_ + _).410 `d[s, v]_smove =
`d[↓[s], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove).+2
have ->: ↓[s] = ↓[sp].
have sLDspL : s ldisk != sp ldisk by rewrite sLp1 spLp0.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe 411 sLDspL : s ldisk != sp ldisk
421 422
apply /ffunP => i; rewrite !ffunE.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe 411 429 i : ordinal_finType n
s (trshift 1 i) = sp (trshift 1 i)
422
apply : move_disk1 sMsp sLDspL _.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe 411 42e
ldisk != trshift 1 i
422
by apply /negP => /eqP/val_eqP /=; rewrite eqn_leq leqNgt ltn_ord.
rewrite (gdist_cons csH) addnS; congr (_).+1 .410 `d[(sp, cs1, cs2).1 .1 , v]_smove =
`d[↓[sp], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove).+1
move : csH => /gpath_consr csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe csH : gpath smove (sp, cs1, cs2).1 .1 v
(sp, cs1, cs2).2
43b
have ctEctp : ↓[t] = ↓[tp].
have tLDtpL : t ldisk != tp ldisk by rewrite tLp0 tpLp3 eq_sym.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe 440 tLDtpL : t ldisk != tp ldisk
444 445
apply /ffunP => i; rewrite !ffunE.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 39b 3a6 3b1 3d0 3fe 440 44d 42e
t (trshift 1 i) = tp (trshift 1 i)
445
apply : move_disk1 tMtp tLDtpL _.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 2ee 373 38f 390 391 392 393 3a6 3b1 3d0 3fe 440 42e
434 445
by apply /negP => /eqP/val_eqP /=; rewrite eqn_leq leqNgt ltn_ord.
case : cs3 scs2E => [[spEt cs2E]|c3 cs3 /= [spE cs2E]].5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 440 448 spEt : sp = t
cs2E : cs2 = tp :: cs4
43b
move : csH; rewrite spEt cs2E => csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 448 45e 45f csH : gpath smove (t, cs1, tp :: cs4).1 .1 v
(t, cs1, tp :: cs4).2
`d[(t, cs1, tp :: cs4).1 .1 , v]_smove =
`d[↓[t], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove).+1
460
rewrite gdist0 add0n (gdist_cons csH) ctEctp.46a (`d[tp, v]_smove).+1 = (`d[↓[tp], ↓[v]]_smove).+1
460
move : csH => /gpath_consr csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 448 45e 45f csH : gpath smove tp v cs4
470 460
rewrite gdist_cunlift_eq //; try by apply : sirr.474 connect (move (q:=4 ) (srel (n:=4 ))) tp v
460
by apply : shanoi_connect.
move : csH; rewrite cs2E -cat_rcons => csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 448 463 2ee 464 465 csH : gpath smove
(sp, cs1, rcons cs3 t ++ tp :: cs4).1 .1 v
(sp, cs1, rcons cs3 t ++ tp :: cs4).2
466
rewrite (gdist_cat csH) last_rcons.480 `d[(sp, cs1, rcons cs3 t ++ tp :: cs4).1 .1 , t]_smove +
`d[t, v]_smove =
`d[↓[sp], ↓[t]]_smove + (`d[↓[t], ↓[v]]_smove).+1
rewrite gdist_cunlift_eq //; try apply : sirr; last 2 first .480 connect (move (q:=4 ) (srel (n:=4 )))
(sp, cs1, rcons cs3 t ++ tp :: cs4).1 .1 t
- 487
by apply : shanoi_connect.
- 491
by rewrite tLp0.
congr (_ + _).480 `d[t, v]_smove = (`d[↓[t], ↓[v]]_smove).+1
move : csH => /gpath_catr; rewrite last_rcons => csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 448 463 2ee 464 465 csH : gpath smove t v (tp :: cs4)
49b
rewrite (gdist_cons csH); congr (_).+1 .49f `d[tp, v]_smove = `d[↓[t], ↓[v]]_smove
move : csH => /gpath_consr csH.5 129 26f 270 271 272 15 16 17 12 13 14 297 29c 2a6 2bb 2bc 2ce 2cf 2d0 2d5 2dd 2e8 2fa 319 34e 365 373 38f 390 391 393 39b 3a6 3b1 3d0 3fe 448 463 2ee 464 465 475
4a4
rewrite ctEctp gdist_cunlift_eq //; try apply : sirr.
by apply : shanoi_connect.
Qed .
Definition sgdist1 n (p2 : peg 4 ) (u v : configuration 4 n.+1 ) :=
let : (exist (x, _) _) := sgdist_pair p2 u v in x.
Definition sgdist2 n (p2 : peg 4 ) (u v : configuration 4 n.+1 ) :=
let : (exist (_, x) _) := sgdist_pair p2 u v in x.
Lemma sgdistE n (p2 : peg 4 ) (u v : configuration 4 n.+1 )
(p1 := u ldisk) (p3 := v ldisk):
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
[/\ codom (sgdist1 p2 u v) \subset [:: p2; p3],
codom (sgdist2 p2 u v) \subset [:: p1; p2] &
`d[u, v]_smove = D[[:: ↓[u]; sgdist1 p2 u v; sgdist2 p2 u v; ↓[v]]].+2 ].26e p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
[/\ codom (sgdist1 (n:=n) p2 u v) \subset [:: p2; p3],
codom (sgdist2 (n:=n) p2 u v) \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; sgdist1 (n:=n) p2 u v;
sgdist2 (n:=n) p2 u v; ↓[v]]].+2 ]
Proof .4ad
move => p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0.291 [/\ codom (sgdist1 (n:=n) p2 u v) \subset [:: p2; p3],
codom (sgdist2 (n:=n) p2 u v) \subset [:: p1; p2]
& `d[u, v]_smove =
D[[:: ↓[u]; sgdist1 (n:=n) p2 u v;
sgdist2 (n:=n) p2 u v; ↓[v]]].+2 ]
by rewrite /sgdist1 /sgdist2; case : sgdist_pair => [] [x y] [].
Qed .
(* The beta function *)
Definition beta n l k :=
if ((1 < l) && (k == n.-1 )) then α_[l] k else (α_[1 ] k).*2 .
Local Notation "β_[ n , l ]" := (beta n l) (format "β_[ n , l ]" ).
Lemma leq_beta n l k : α_[l] k <= β_[n, l] k.
Proof .4b6
rewrite /beta; case : (_ < _) => /=; last first .4b8 α_[l] k <= (α_[1 ] k).*2
by apply : bound_alphaL.
by case : (_ == _) => //=; apply : bound_alphaL.
Qed .
Lemma geq_beta n l k : β_[n, l] k <= (α_[1 ] k).*2 .β_[n, l] k <= (α_[1 ] k).*2
Proof .4c7
rewrite /beta; case : (_ < _) => //=.4c9 (if k == n.-1 then α_[l] k else (α_[1 ] k).*2 ) <=
(α_[1 ] k).*2
by case : (_ == _) => //=; apply : bound_alphaL.
Qed .
Lemma beta1E n k : β_[n, 1 ] k = (α_[1 ] k).*2 .5 129 4cb
β_[n, 1 ] k = (α_[1 ] k).*2
Proof .4d3
by rewrite /beta ltnn. Qed .
Definition sp n (a : configuration 4 n) l p :=
\sum_(k < n) (a k != p) * β_[n, l] k.
Lemma sum_beta_S n l (a : configuration 4 n.+1 ) p : 1 < l ->
sp a l p =
\sum_(k < n) ((↓[a] k != p) * (α_[1 ] k).*2 ) + (a ord_max != p) * α_[l] n.5 4ca a : configuration 4 n.+1
p : ordinal_eqType 4
1 < l ->
sp (n:=n.+1 ) a l p =
\sum_(k < n) (↓[a] k != p) * (α_[1 ] k).*2 +
(a ord_max != p) * α_[l] n
Proof .4d9
move => l_gt1; rewrite /sp.\sum_(k < n.+1 ) (a k != p) * β_[n.+1 , l] k =
\sum_(k < n) (↓[a] k != p) * (α_[1 ] k).*2 +
(a ord_max != p) * α_[l] n
rewrite big_ord_recr /= /beta l_gt1 eqxx /=; congr (_ + _).4e3 \sum_(i < n)
(a (widen_ord (m:=n.+1 ) (leqnSn n) i) != p) *
(if i == n then α_[l] i else (α_[1 ] i).*2 ) =
\sum_(k < n) (↓[a] k != p) * (α_[1 ] k).*2
apply : eq_bigr => i _; rewrite !ffunE; congr ((a _ != _) * _).widen_ord (m:=n.+1 ) (leqnSn n) i = trshift 1 i
by apply : val_inj.
by rewrite eqn_leq [_ <= i]leqNgt ltn_ord andbF.
Qed .
Lemma leq_sum_beta n l a :
\sum_(k < n) a k * β_[n, l] k <= \sum_(k < n) a k * (α_[1 ] k).*2 .\sum_(k < n) a k * β_[n, l] k <=
\sum_(k < n) a k * (α_[1 ] k).*2
Proof .4f7
by apply : leq_sum => i _; rewrite leq_mul2l geq_beta orbT.
Qed .
Lemma sum_alpha_diffE n (f : configuration 4 n.+1 ) (p1 p2 : peg 4 ) v1 v2 :
1 < v1 -> 1 < v2 -> p1 != p2 -> codom f \subset [:: p1; p2] ->
sp f v1 p1 + sp f v2 p2 <= (S_[1 ] n).*2 + α_[maxn v1 v2] n.5 129 f : configuration 4 n.+1
229 v1, v2 : nat
1 < v1 ->
1 < v2 ->
p1 != p2 ->
codom f \subset [:: p1; p2] ->
sp (n:=n.+1 ) f v1 p1 + sp (n:=n.+1 ) f v2 p2 <=
(S_[1 ] n).*2 + α_[maxn v1 v2] n
Proof .4fe
move => v1_gt1 v2_gt1 p1Dp2 cH.5 129 501 229 502 v1_gt1 : 1 < v1
v2_gt1 : 1 < v2
15 cH : codom f \subset [:: p1; p2]
sp (n:=n.+1 ) f v1 p1 + sp (n:=n.+1 ) f v2 p2 <=
(S_[1 ] n).*2 + α_[maxn v1 v2] n
rewrite !sum_beta_S //.508 \sum_(k < n) (↓[f] k != p1) * (α_[1 ] k).*2 +
(f ord_max != p1) * α_[v1] n +
(\sum_(k < n) (↓[f] k != p2) * (α_[1 ] k).*2 +
(f ord_max != p2) * α_[v2] n) <=
(S_[1 ] n).*2 + α_[maxn v1 v2] n
rewrite -addnA -addnCA addnC !addnA -addnA leq_add //.508 \sum_(k < n) (↓[f] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n) (↓[f] k != p2) * (α_[1 ] k).*2 <=
(S_[1 ] n).*2
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.508 \sum_(k < n) (↓[f] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n) (↓[f] k != p2) * (α_[1 ] k).*2 =
(S_[1 ] n).*2
515
rewrite -addnn !dsum_alphaLE -!big_split /=; apply : eq_bigr => i _.5 129 501 229 502 509 50a 15 50b 4ee
(↓[f] i != p1) * (α_[1 ] i).*2 +
(↓[f] i != p2) * (α_[1 ] i).*2 = α_[1 ] i + α_[1 ] i
515
rewrite !ffunE; set v := trshift _ _.5 129 501 229 502 509 50a 15 50b 4ee v := trshift 1 i : 'I_(1 + n)
(f v != p1) * (α_[1 ] i).*2 +
(f v != p2) * (α_[1 ] i).*2 = α_[1 ] i + α_[1 ] i
515
have /subsetP := cH => /(_ (f v) (codom_f _ _)).524 f v \in [:: p1; p2] ->
(f v != p1) * (α_[1 ] i).*2 +
(f v != p2) * (α_[1 ] i).*2 = α_[1 ] i + α_[1 ] i
515
rewrite !inE addnn.524 (f v == p1) || (f v == p2) ->
(f v != p1) * (α_[1 ] i).*2 +
(f v != p2) * (α_[1 ] i).*2 = (α_[1 ] i).*2
515
case : eqP => /= x1; case : eqP => /= x2; rewrite ?(mul1n, add0n, addn0) //.5 129 501 229 502 509 50a 15 50b 4ee 525 x1 : f v = p1
x2 : f v = p2
true -> 0 * (α_[1 ] i).*2 = (α_[1 ] i).*2
515
by move /eqP: x2; rewrite x1 (negPf p1Dp2).508 (f ord_max != p2) * α_[v2] n +
(f ord_max != p1) * α_[v1] n <= α_[maxn v1 v2] n
have /subsetP/(_ (f ord_max) (codom_f _ _)) := cH.508 f ord_max \in [:: p1; p2] ->
(f ord_max != p2) * α_[v2] n +
(f ord_max != p1) * α_[v1] n <= α_[maxn v1 v2] n
rewrite !inE.508 (f ord_max == p1) || (f ord_max == p2) ->
(f ord_max != p2) * α_[v2] n +
(f ord_max != p1) * α_[v1] n <= α_[maxn v1 v2] n
case : eqP => /= x1; case : eqP => /= x2 // _; rewrite ?(mul1n, add0n, addn0) //;
apply : (increasingE (increasing_alphaL_l _)).5 129 501 229 502 509 50a 15 50b x1 : f ord_max = p1
x2 : f ord_max <> p2
v2 <= maxn v1 v2
by apply : leq_maxr.
by apply : leq_maxl.
Qed .
(* This corresponds to 4.1 *)
Section Case1 .
Definition sd n l (u : {ffun 'I_l.+1 -> configuration 4 n}) :=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove.
Variable n : nat.
Hypothesis IH :
forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l -> codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <= sd u +
sp (u ord0) l (a[p1, p3] 0 ) +
sp (u ord_max) l (a[p1, p3] l).
Variable l : nat.
Variables p1 p2 p3 : peg 4 .
Variable u : {ffun 'I_l.+2 -> configuration 4 n.+2 }.
Hypothesis p1Dp2 : p1 != p2.
Hypothesis p1Dp3 : p1 != p3.
Hypothesis p2Dp3 : p2 != p3.
Hypothesis p1Dp0 : p1 != p0.
Hypothesis p2Dp0 : p2 != p0.
Hypothesis p3Dp0 : p3 != p0.
Hypothesis cH : forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u k) \subset [:: p2; a[p1, p3] k].
Let u' := ([ffun i => ↓[u i]] : {ffun 'I_l.+2 -> configuration 4 n.+1 })
: {ffun 'I_l.+2 -> configuration 4 n.+1 }.
Let H : forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u' k) \subset [:: p2; a[p1, p3] k].5 129 IH : forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <=
sd (n:=n.+1 ) u +
sp (n:=n.+1 ) (u ord0) l ( a[p1, p3] 0 ) +
sp (n:=n.+1 ) (u ord_max) l ( a[p1, p3] l)
l : nat
11 u : {ffun 'I_l.+2 -> configuration 4 n.+2 }
15 16 17 12 13 14 cH : forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]
u' := ([ffun i => ↓[u i]]
: {ffun 'I_l.+2 -> configuration 4 n.+1 })
: {ffun 'I_l.+2 -> configuration 4 n.+1 } : {ffun 'I_l.+2 -> configuration 4 n.+1 }
forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u' k) \subset [:: p2; a[p1, p3] k]
Proof .553
by move => k kH; rewrite ffunE; apply /codom_liftr/cH. Qed .
Let apeg13D2 a : a[p1, p3] a != p2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a H : forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u' k) \subset [:: p2; a[p1, p3] k]
228 a[p1, p3] a != p2
Proof .55e
by rewrite /apeg; case : odd; rewrite // eq_sym. Qed .
Let apeg13D0 a : a[p1, p3] a != p0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 apeg13D2 : forall a : nat, a[p1, p3] a != p2
228 a[p1, p3] a != p0
Proof .565
by rewrite /apeg; case : odd; rewrite // eq_sym. Qed .
Hypothesis KH1 : u ord0 ord_max = p1.
Hypothesis KH2 : u ord_max ord_max != a[p3, p1] l.
Hypothesis l_gt0 : l != 0 .
Lemma case1 :
(S_[l.+1 ] n.+2 ).*2 <=
sd u + sp (u ord0) l.+1 p1 +
sp (u ord_max) l.+1 (a[p3, p1] l).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 apeg13D0 : forall a : nat, a[p1, p3] a != p0
KH1 : u ord0 ord_max = p1
KH2 : u ord_max ord_max != a[p3, p1] l
l_gt0 : l != 0
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
Proof .56c
have il1E : inord l.+1 = ord_max :> 'I_l.+2
by apply /val_eqP; rewrite /= inordK.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 il1E : inord l.+1 = ord_max
573
have iE : exists i , u (inord i) ord_max != a[p1, p3] i.578 exists i : nat, u (inord i) ord_max != a[p1, p3] i
by exists l .+1 ; rewrite apegS il1E.
case : (@ex_minnP _ iE) => a aH aMin.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 aH : u (inord a) ord_max != a[p1, p3] a
aMin : forall n0 : nat,
u (inord n0) ord_max != a[p1, p3] n0 ->
a <= n0
573
have aMin1 i : i < a -> u (inord i) ord_max = a[p1, p3] i.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 14a
i < a -> u (inord i) ord_max = a[p1, p3] i
by case : (u (inord i) ord_max =P a[p1, p3] i) => // /eqP /aMin; case : leqP.
have aLld1 : a <= l.+1 by apply : aMin; rewrite apegS il1E.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 aLld1 : a <= l.+1
573
have a_gt0 : 0 < a by case : (a) aH; rewrite // apeg0 -KH1 inord_eq0 //= eqxx.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b a_gt0 : 0 < a
573
pose ai : 'I_l.+2 := inord a.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 ai := inord a : 'I_l.+2 : 'I_l.+2
573
have aiE : ai = a :> nat by rewrite inordK.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 aiE : ai = a
573
pose b := l.+1 - a.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa b := l.+1 - a : nat
573
pose bi : 'I_l.+2 := inord b.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af bi := inord b : 'I_l.+2 : 'I_l.+2
573
have biE : bi = b :> nat by rewrite inordK // /b ltn_subLR // leq_addl.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 biE : bi = b
573
have l_ggt0 : 0 < l by case : l l_gt0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 l_ggt0 : 0 < l
573
have [/andP[a_gt1 aLlm1]|] := boolP (2 <= a <= l.-1 ).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be a_gt1 : 1 < a
aLlm1 : a <= l.-1
573
have aLl : a <= l by rewrite (leq_trans aLlm1) // -subn1 leq_subr.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 aLl : a <= l
573 5c5
have b_gt1 : 1 < b by rewrite leq_subRL // addn2 ltnS -[l]prednK.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc b_gt1 : 1 < b
573 5c5
have uaiLEp2 : u ai ldisk = p2.
have /cH/subsetP/(_ (u ai ldisk) (codom_f _ _)) : 0 < ai < l.+1 .
by rewrite aiE (leq_trans _ a_gt1) //= ltnS (leq_trans aLl1)
// ssrnat.leq_pred.
by rewrite !inE aiE (negPf aH) orbF => /eqP.
pose si i : configuration 4 n.+1 :=
sgdist1 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 si := (fun i : nat =>
sgdist1 (n:=n.+1 ) p2 (u (inord i))
(u (inord i.+1 )))
: nat -> configuration 4 n.+1 : nat -> configuration 4 n.+1
573 5c5
pose ti i : configuration 4 n.+1 :=
sgdist2 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb ti := (fun i : nat =>
sgdist2 (n:=n.+1 ) p2 (u (inord i))
(u (inord i.+1 )))
: nat -> configuration 4 n.+1 : nat -> configuration 4 n.+1
573 5c5
have sitiH i : i < a.-1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 14a
i < a.-1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk],
codom (ti i) \subset [:: u (inord i) ldisk; p2]
& `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i;
↓[u (inord i.+1 )]]].+2 ]
move => iLa.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 14a iLa : i < a.-1
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk],
codom (ti i) \subset [:: u (inord i) ldisk; p2]
& `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i;
↓[u (inord i.+1 )]]].+2 ]
5f6
have iLa1 : i < a by rewrite (leq_trans iLa) // ssrnat.leq_pred.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 14a 5fe iLa1 : i < a
5ff 5f6
apply : sgdistE => //.603 u (inord i) ldisk != p2
- 606
by rewrite aMin1.
- 614
rewrite !aMin1 //; last by rewrite -[a]prednK.603 a[p1, p3] i != a[p1, p3] i.+1
616
by rewrite apegS apeg_eqC.
- 61d
by rewrite aMin1 1 ?eq_sym // -[a]prednK.
- 622
by rewrite aMin1.
by rewrite aMin1 // -[a]prednK.
pose sam1 : configuration 4 n.+1 :=
sgdist1 (a[p1, p3] a) (u (inord a.-1 )) (u (inord a)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 sam1 := sgdist1 (n:=n.+1 ) ( a[p1, p3] a)
(u (inord a.-1 )) (u (inord a))
: configuration 4 n.+1 : configuration 4 n.+1
573 5c5
pose tam1 : configuration 4 n.+1 :=
sgdist2 (a[p1, p3] a) (u (inord a.-1 )) (u (inord a)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 tam1 := sgdist2 (n:=n.+1 ) ( a[p1, p3] a)
(u (inord a.-1 )) (u (inord a))
: configuration 4 n.+1 : configuration 4 n.+1
573 5c5
have [sam1C tam1C duam1ua1E] :
[/\ codom sam1 \subset [:: a[p1, p3] a; u (inord a) ldisk ],
codom tam1 \subset [:: u (inord a.-1 ) ldisk; a[p1, p3] a] &
`d[u (inord a.-1 ), u (inord a)]_smove =
D[[:: ↓[u (inord a.-1 )]; sam1; tam1; ↓[u (inord a)]]].+2 ].634 [/\ codom sam1 \subset
[:: a[p1, p3] a; u (inord a) ldisk],
codom tam1 \subset
[:: u (inord a.-1 ) ldisk; a[p1, p3] a]
& `d[u (inord a.-1 ), u (inord a)]_smove =
D[[:: ↓[u (inord a.-1 )]; sam1; tam1;
↓[u (inord a)]]].+2 ]
apply : sgdistE => //.634 u (inord a.-1 ) ldisk != a[p1, p3] a
- 641
by rewrite aMin1 ?prednK // -{2 }[a]prednK //= apegS apeg_eqC.
- 64f
by rewrite uaiLEp2 aMin1 ?prednK .
- 654
by rewrite uaiLEp2.
- 659
by rewrite aMin1 ?prednK .
by rewrite uaiLEp2.
have {}tam1C : codom tam1 \subset [:: p1; p3].63c codom tam1 \subset [:: p1; p3]
move : tam1C; rewrite aMin1; last by rewrite -{2 }[a]prednK.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f
codom tam1 \subset [:: a[p1, p3] a.-1 ; a[p1, p3] a] ->
codom tam1 \subset [:: p1; p3]
667
rewrite -subn1 apegO oddB //= [a[_, _]a]apegO; case : odd => //=.66e codom tam1 \subset [:: a[p3, p1] 0 ; a[p3, p1] 1 ] ->
codom tam1 \subset [:: p1; p3]
667
by rewrite codom_subC.
pose u1 :=
[ffun i =>
if ((i : 'I_(3 * a).-2 .+1 ) == 3 * a.-1 :>nat) then ↓[u (inord a.-1 )]
else if (i == (3 * a.-1 ).+1 :>nat) then sam1
else if (i %% 3 ) == 0 then ↓[u (inord (i %/ 3 ))]
else if (i %% 3 ) == 1 then si (i %/ 3 )
else ti (i %/ 3 )].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a u1 := [ffun i => if
(i : 'I_(3 * a).-2 .+1 ) ==
3 * a.-1 :> nat
then ↓[u (inord a.-1 )]
else
if i == (3 * a.-1 ).+1 :> nat
then sam1
else
if i %% 3 == 0
then ↓[u (inord (i %/ 3 ))]
else
if i %% 3 == 1
then si (i %/ 3 )
else ti (i %/ 3 )] : {ffun forall x : ordinal_finType (3 * a).-2 .+1 ,
(fun => configuration 4 n.+1 ) x}
573 5c5
have u10E : u1 ord0 = ↓[u ord0].
rewrite ffunE /= ifN ?inord_eq0 //.
by rewrite neq_ltn muln_gt0 /= -ltnS prednK //= a_gt1.
have uiME : u1 ord_max = sam1.
rewrite ffunE /= eqn_leq leqNgt -{2 }[a]prednK // mulnS.682 (if
~~ (3 * a.-1 < (3 + 3 * a.-1 ).-2 ) &&
(3 * a.-1 <= (3 * a).-2 )
then ↓[u (inord a.-1 )]
else
if (3 * a).-2 == (3 * a.-1 ).+1
then sam1
else
if (3 * a).-2 %% 3 == 0
then ↓[u (inord ((3 * a).-2 %/ 3 ))]
else
if (3 * a).-2 %% 3 == 1
then si ((3 * a).-2 %/ 3 )
else ti ((3 * a).-2 %/ 3 )) = sam1
68f
rewrite addSn add2n ltnS leqnn /=.682 (if (3 * a).-2 == (3 * a.-1 ).+1
then sam1
else
if (3 * a).-2 %% 3 == 0
then ↓[u (inord ((3 * a).-2 %/ 3 ))]
else
if (3 * a).-2 %% 3 == 1
then si ((3 * a).-2 %/ 3 )
else ti ((3 * a).-2 %/ 3 )) = sam1
68f
by rewrite -{1 }[a]prednK // mulnS eqxx.
pose u2 := [ffun i : 'I_3 =>
if i == 0 :> nat then sam1 else
if i == 1 :> nat then tam1 else ↓[u ai]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 u2 := [ffun i => if i == 0 :> nat
then sam1
else
if i == 1 :> nat
then tam1
else ↓[u ai]] : {ffun forall x : ordinal_finType 3 ,
(fun => configuration 4 n.+1 ) x}
573 5c5
pose u3 := [ffun i => ↓[u (inord ((i : 'I_b.+1 ) + a))]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 u3 := [ffun i => ↓[u (inord ((i : 'I_b.+1 ) + a))]] : {ffun forall x : ordinal_finType b.+1 ,
(fun => configuration 4 n.+1 ) x}
573 5c5
have P1 : a.*2 + sd u1 + sd u2 + sd u3 <= sd u.6a6 a.*2 + sd (n:=n.+1 ) u1 + sd (n:=n.+1 ) u2 +
sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
have G b1 : b1 = a ->
\sum_(i < (3 * b1).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < (3 * a.-1 )) `d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 b1 : nat
b1 = a ->
\sum_(i < (3 * b1).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < 3 * a.-1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove
move => b1Ea.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 6b4 b1Ea : b1 = a
\sum_(i < (3 * b1).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < 3 * a.-1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove
6b6
have ta2E : (3 * b1).-2 = (3 * a.-1 ).+1 .6bd (3 * b1).-2 = (3 * a.-1 ).+1
by rewrite b1Ea -{1 }[a]prednK // mulnS.
rewrite ta2E big_ord_recr /=; congr (_ + `d[_,_]_smove).6c6 u1 (inord (3 * a.-1 )) = ↓[u (inord a.-1 )]
by rewrite ffunE ifT// inordK // -{2 }b1Ea ?ta2E .
rewrite ffunE inordK; last by rewrite -{2 }b1Ea ?ta2E .6c6 (if (3 * a.-1 ).+1 == 3 * a.-1
then ↓[u (inord a.-1 )]
else
if (3 * a.-1 ).+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * a.-1 ).+1 %% 3 == 0
then ↓[u (inord ((3 * a.-1 ).+1 %/ 3 ))]
else
if (3 * a.-1 ).+1 %% 3 == 1
then si ((3 * a.-1 ).+1 %/ 3 )
else ti ((3 * a.-1 ).+1 %/ 3 )) = sam1
6b6
by rewrite eqn_leq ltnn /= eqxx.
rewrite {}[sd u1]G //.6a6 a.*2 +
(\sum_(i < 3 * a.-1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 +
sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
6ac
have -> := @sum3E _ (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_smove).6a6 a.*2 +
(\sum_(i < a.-1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 +
sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
6ac
have -> : a.*2 = 2 + \sum_(i < a.-1 ) 2 .6a6 a.*2 = 2 + \sum_(i < a.-1 ) 2
rewrite sum_nat_const /= cardT size_enum_ord.6a6 a.*2 = 2 + a.-1 * 2
6e8
by rewrite muln2 -(doubleD 1 ) add1n prednK.6a6 2 + \sum_(i < a.-1 ) 2 +
(\sum_(i < a.-1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 +
sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
6ac
rewrite !addnA -[2 + _ + _]addnA -big_split /=.6a6 2 +
\sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
`d[↓[u (inord a.-1 )], sam1]_smove + sd (n:=n.+1 ) u2 +
sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
6ac
rewrite [2 + _]addnC -!addnA 2 ![X in _ + X <= _]addnA addnA.6a6 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
(2 + `d[↓[u (inord a.-1 )], sam1]_smove +
sd (n:=n.+1 ) u2) + sd (n:=n.+1 ) u3 <= sd (n:=n.+2 ) u
6ac
have -> : sd u =
\sum_(i < a.-1 ) (`d[u (inord i), u (inord i.+1 )]_smove) +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b) `d[u (inord (a +i)), u (inord (a + i.+1 ))]_smove.6a6 sd (n:=n.+2 ) u =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
have F := big_mkord xpredT
(fun i => `d[u (inord i), u (inord i.+1 )]_smove).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 F : forall (n0 : nat) (n1 : nat -> nat -> nat)
(n2 : nat),
\big[n1/n0]_(0 <= i < n2)
`d[u (inord i), u (inord i.+1 )]_smove =
\big[n1/n0]_(i < n2) `d[
u (inord i), u (inord i.+1 )]_smove
6fe 6ff
rewrite -{}[sd u]F.6a6 \sum_(0 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ff
rewrite (big_cat_nat _ _ _ (_ : _ <= (a.-1 ).+1 )) //=; last first .
by rewrite prednK.6a6 \sum_(0 <= i < a.-1 .+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a.-1 .+1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ff
rewrite big_mkord big_ord_recr /= prednK //.6a6 \sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u (inord a)]_smove +
\sum_(a <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ff
rewrite -{9 }[a]add0n big_addn -/b big_mkord.6a6 \sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u (inord a)]_smove +
\sum_(i < b)
`d[u (inord (i + a)), u (inord (i + a).+1 )]_smove =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ff
congr (_ + _ + _).6a6 \sum_(i < b)
`d[u (inord (i + a)), u (inord (i + a).+1 )]_smove =
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ff
by apply : eq_bigr => i; rewrite addnC addnS.6a6 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
(2 + `d[↓[u (inord a.-1 )], sam1]_smove +
sd (n:=n.+1 ) u2) + sd (n:=n.+1 ) u3 <=
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ac
apply : leq_add; first apply : leq_add.6a6 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) <=
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove
- 727
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.6a6 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove
72a
apply : eq_bigr => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 i : 'I_a.-1
2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
72a
have -> : u1 (inord (3 * i)) = ↓[u (inord i)].737 u1 (inord (3 * i)) = ↓[u (inord i)]
rewrite ffunE inordK; last first .
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite leq_mul2l /= ltnW.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.737 (if 3 * i == 3 * a.-1
then ↓[u (inord a.-1 )]
else
if 3 * i == (3 * a.-1 ).+1
then sam1
else
if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 )) = ↓[u (inord i)]
73e
rewrite eqn_mul2l /= eqn_leq [_ <= i]leqNgt ltn_ord andbF.737 (if 3 * i == (3 * a.-1 ).+1
then sam1
else
if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 )) = ↓[u (inord i)]
73e
rewrite eqn_leq ltn_mul2l /= ltnNge [i <= _]ltnW // andbF.737 (if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 )) = ↓[u (inord i)]
73e
by rewrite mod3E eqxx mulKn.737 2 +
(`d[↓[u (inord i)], u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
72a
have -> : u1 (inord (3 * i).+1 ) = si i.737 u1 (inord (3 * i).+1 ) = si i
rewrite ffunE inordK; last first .737 (3 * i).+1 < (3 * a).-2 .+1
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite ltn_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.737 (if (3 * i).+1 == 3 * a.-1
then ↓[u (inord a.-1 )]
else
if (3 * i).+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )) = si i
766
rewrite eqn_leq [_ <= _.+1 ]leqNgt.737 (if (3 * i < 3 * a.-1 ) && ~~ ((3 * i).+1 < 3 * a.-1 )
then ↓[u (inord a.-1 )]
else
if (3 * i).+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )) = si i
766
rewrite (leq_trans (_ : (3 * i).+2 <= (3 * i.+1 ))) ?andbF //;
last 2 first .
- 780
by rewrite mulnS addSn add2n.
- 78a
by rewrite leq_mul2l /=.737 (if (3 * i).+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )) = si i
766
rewrite eqn_leq !ltnS [_ <= 3 * i]leq_mul2l.737 (if (3 * i <= 3 * a.-1 ) && ((3 == 0 ) || (a.-1 <= i))
then sam1
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )) = si i
766
by rewrite [_ <= i]leqNgt ltn_ord andbF mod3E /= div3E.737 2 +
(`d[↓[u (inord i)], si i]_smove +
`d[si i, u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
72a
have -> : u1 (inord (3 * i).+2 ) = ti i.737 u1 (inord (3 * i).+2 ) = ti i
rewrite ffunE inordK; last first .737 (3 * i).+2 < (3 * a).-2 .+1
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
rewrite (leq_trans (_ : _ <= 3 * (i.+1 ))) //.
by rewrite mulnS addSn add2n.
by rewrite leq_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.737 (if (3 * i).+2 == 3 * a.-1
then ↓[u (inord a.-1 )]
else
if (3 * i).+2 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )) = ti i
79e
rewrite eqn_leq [_ <= _.+1 ]leqNgt.737 (if
((3 * i).+1 < 3 * a.-1 ) &&
~~ ((3 * i).+2 < 3 * a.-1 )
then ↓[u (inord a.-1 )]
else
if (3 * i).+2 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )) = ti i
79e
rewrite -[(3 * i).+3 ](mulnDr 3 1 i) leq_mul2l ltn_ord andbF.737 (if (3 * i).+2 == (3 * a.-1 ).+1
then sam1
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )) = ti i
79e
rewrite eqn_leq !ltnS [_ <= _.+1 ]leqNgt.737 (if (3 * i < 3 * a.-1 ) && ~~ ((3 * i).+1 < 3 * a.-1 )
then sam1
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )) = ti i
79e
rewrite (leq_trans (_ : (3 * i).+1 < 3 * (i.+1 ))) ?andbF //;
last 2 first .
- 7c5
by rewrite mulnS addSn add2n.
- 7cb
by rewrite leq_mul2l /=.737 (if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )) = ti i
79e
by rewrite mod3E /= div3E.
have -> : u1 (inord (3 * i).+3 ) = ↓[u (inord i.+1 )].737 u1 (inord (3 * i).+3 ) = ↓[u (inord i.+1 )]
have -> : (3 * i).+3 = 3 * (i.+1 ) by rewrite mulnS addSn add2n.737 u1 (inord (3 * i.+1 )) = ↓[u (inord i.+1 )]
7d9
rewrite ffunE inordK; last first .737 3 * i.+1 < (3 * a).-2 .+1
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite leq_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.737 (if 3 * i.+1 == 3 * a.-1
then ↓[u (inord a.-1 )]
else
if 3 * i.+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * i.+1 ) %% 3 == 0
then ↓[u (inord ((3 * i.+1 ) %/ 3 ))]
else
if (3 * i.+1 ) %% 3 == 1
then si ((3 * i.+1 ) %/ 3 )
else ti ((3 * i.+1 ) %/ 3 )) = ↓[u (inord i.+1 )]
7d9
rewrite eqn_mul2l /=; case : eqP => [->//|_].737 (if 3 * i.+1 == (3 * a.-1 ).+1
then sam1
else
if (3 * i.+1 ) %% 3 == 0
then ↓[u (inord ((3 * i.+1 ) %/ 3 ))]
else
if (3 * i.+1 ) %% 3 == 1
then si ((3 * i.+1 ) %/ 3 )
else ti ((3 * i.+1 ) %/ 3 )) = ↓[u (inord i.+1 )]
7d9
rewrite eqn_leq [_ <= 3 * i.+1 ]leqNgt ltnS leq_mul2l /= ltn_ord andbF.737 (if (3 * i.+1 ) %% 3 == 0
then ↓[u (inord ((3 * i.+1 ) %/ 3 ))]
else
if (3 * i.+1 ) %% 3 == 1
then si ((3 * i.+1 ) %/ 3 )
else ti ((3 * i.+1 ) %/ 3 )) = ↓[u (inord i.+1 )]
7d9
by rewrite mod3E /= div3E.
case : (sitiH i) => // _ _ ->.737 2 +
(`d[↓[u (inord i)], si i]_smove + `d[si i, ti i]_smove +
`d[ti i, ↓[u (inord i.+1 )]]_smove) =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2
72a
by rewrite add2n /= addnA addn0.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
sd (n:=n.+1 ) u2 <= `d[u (inord a.-1 ), u ai]_smove
- 800
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
sd (n:=n.+1 ) u2 = `d[u (inord a.-1 ), u ai]_smove
803
rewrite /sd !big_ord_recr big_ord0 //= add0n !addnA.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
`d[u2 (inord 0 ), u2 (inord 1 )]_smove +
`d[u2 (inord 1 ), u2 (inord 2 )]_smove =
`d[u (inord a.-1 ), u ai]_smove
803
have -> : u2 (inord 0 ) = sam1 by rewrite ffunE /= inordK.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
`d[sam1, u2 (inord 1 )]_smove +
`d[u2 (inord 1 ), u2 (inord 2 )]_smove =
`d[u (inord a.-1 ), u ai]_smove
803
have -> : u2 (inord 1 ) = tam1 by rewrite ffunE /= inordK.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
`d[sam1, tam1]_smove + `d[tam1, u2 (inord 2 )]_smove =
`d[u (inord a.-1 ), u ai]_smove
803
have -> : u2 (inord 2 ) = ↓[u ai] by rewrite ffunE /= inordK.6a6 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u ai]]_smove =
`d[u (inord a.-1 ), u ai]_smove
803
by move : duam1ua1E; rewrite /= addn0 add2n !addnA !addSn.6a6 sd (n:=n.+1 ) u3 <=
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ac
apply : leq_sum => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 i : ordinal_finType b
`d[u3 (inord i), u3 (inord i.+1 )]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ac
rewrite ffunE inordK; last by rewrite ltnS ltnW.820 `d[↓[u (inord (i + a))], u3 (inord i.+1 )]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ac
rewrite ffunE inordK; last by rewrite ltnS.820 `d[↓[u (inord (i + a))], ↓[u (inord (i.+1 + a))]]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
6ac
rewrite addSn [i + _]addnC addnS.820 `d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove <=
`d[u (inord (a + i)), u (inord (a + i).+1 )]_smove
6ac
by apply /gdist_cunlift/shanoi_connect.
set x1P1 := sd _ in P1; set x2P1 := sd _ in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 x1P1 := sd (n:=n.+1 ) u1 : nat
x2P1 := sd (n:=n.+1 ) u2 : nat
P1 : a.*2 + x1P1 + x2P1 + sd (n:=n.+1 ) u3 <=
sd (n:=n.+2 ) u
573 5c5
set x3P1 := sd _ in P1; set xP1 := sd _ in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 x3P1 := sd (n:=n.+1 ) u3 : nat
xP1 := sd (n:=n.+2 ) u : nat
P1 : a.*2 + x1P1 + x2P1 + x3P1 <= xP1
573 5c5
rewrite -/xP1.83c (S_[l.+1 ] n.+2 ).*2 <=
xP1 + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
5c5
have cH2 (k : 'I_(3 * a).-2 .+1 ) :
0 < k < (3 * a).-2 -> codom (u1 k) \subset [:: p2; a[p1, p3] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f k : 'I_(3 * a).-2 .+1
0 < k < (3 * a).-2 ->
codom (u1 k) \subset [:: p2; a[p1, p3] k]
move => /andP[k_gt0 k_lt].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 k_gt0 : 0 < k
k_lt : k < (3 * a).-2
codom (u1 k) \subset [:: p2; a[p1, p3] k]
84a
have kL3a1 : k <= (3 * a.-1 ).
by rewrite -ltnS (leq_trans k_lt) // -{1 }[a]prednK // mulnS.
have kLa1 : k %/ 3 <= a.-1 .
by rewrite -(mulKn a.-1 (isT : 0 < 3 )) leq_div2r.
rewrite ffunE; case : eqP => [kH|/eqP kH].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 kH : k = 3 * a.-1
codom ↓[u (inord a.-1 )] \subset [:: p2; a[p1, p3] k]
rewrite kH apegMr //.86e codom ↓[u (inord a.-1 )] \subset
[:: p2; a[p1, p3] a.-1 ]
871
have := @H (inord a.-1 ); rewrite inordK //.86e (0 < a.-1 < l.+1 ->
codom (u' (inord a.-1 )) \subset
[:: p2; a[p1, p3] a.-1 ]) ->
codom ↓[u (inord a.-1 )] \subset
[:: p2; a[p1, p3] a.-1 ]
rewrite ffunE; apply .
by rewrite -ltnS prednK // a_gt1.
by rewrite prednK // (leq_trans aLld1).
have k3La2 : k %/ 3 <= a.-2 .
rewrite -ltnS [a.-2 .+1 ]prednK //; last first .
by rewrite -subn1 ltn_subRL.
rewrite ltn_divLR // [_ * 3 ]mulnC.
by move : kL3a1 kH; case : ltngtP.
rewrite eqn_leq [_ <= k]leqNgt (leq_trans k_lt) ?andbF //; last first .891 (3 * a).-2 <= (3 * a.-1 ).+1
by rewrite -{1 }[a]prednK // mulnS addSn add2n.
have k3La : k %/ 3 <= a.
by rewrite (leq_trans kLa1) // -subn1 leq_subr.
case : eqP => k3mH.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 k3mH : k %% 3 = 0
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] k]
apply : codom_liftr.8bc codom (u (inord (k %/ 3 ))) \subset
[:: p2; a[p1, p3] k]
8bf
rewrite {2 }(divn_eq k 3 ) k3mH addn0 [in a[_,_] _]mulnC apegMr //.8bc codom (u (inord (k %/ 3 ))) \subset
[:: p2; a[p1, p3] (k %/ 3 )]
8bf
have := @cH (inord (k %/3 )); rewrite inordK; last first .
by rewrite (leq_ltn_trans k3La).
apply .
rewrite (leq_ltn_trans k3La) ?ltnS //.8bc (0 < k %/ 3 ) && true
8bf
move : k_gt0; rewrite andbT {1 }(divn_eq k 3 ) k3mH addn0 muln_gt0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 853 85c 867 874 892 8b5 8bd
(0 < k %/ 3 ) && (0 < 3 ) -> 0 < k %/ 3
8bf
by case /andP.
case : eqP => k3mH1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 8c2 k3mH1 : k %% 3 = 1
codom (si (k %/ 3 )) \subset [:: p2; a[p1, p3] k]
case : (sitiH ((k %/ 3 ))) => /=.
by rewrite -[a.-1 ]prednK // -ltnS prednK.8e9 codom (si (k %/ 3 )) \subset
[:: p2; u (inord (k %/ 3 ).+1 ) ldisk] ->
codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
(`d[↓[u (inord (k %/ 3 ))], si (k %/ 3 )]_smove +
(`d[si (k %/ 3 ), ti (k %/ 3 )]_smove +
(`d[ti (k %/ 3 ), ↓[u (inord (k %/ 3 ).+1 )]]_smove + 0 ))).+2 ->
codom (si (k %/ 3 )) \subset [:: p2; a[p1, p3] k]
8ec
set pp := u _ _; (suff <- : pp = a[p1, p3] k by []); rewrite {}/pp.8e9 u (inord (k %/ 3 ).+1 ) ldisk = a[p1, p3] k
8ec
set i := inord _; have <- : a[p1, p3] i = a[p1, p3] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 8c2 8ea i := inord (k %/ 3 ).+1 : 'I_l.+2
a[p1, p3] i = a[p1, p3] k
rewrite (divn_eq k 3 ) k3mH1 addn1 apegS mulnC apegMr //.902 a[p1, p3] i = a[p3, p1] (k %/ 3 )
905
by rewrite /i !inordK ?apegS //= !ltnS (leq_trans k3La).
have H2 : (k %/ 3 ).+1 < l.+2 by rewrite !ltnS (leq_trans k3La).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 8c2 8ea 903 H2 : (k %/ 3 ).+1 < l.+2
907 8ec
rewrite -(@aMin1 i); last first .
rewrite !inordK // -{2 }[a]prednK // ltnS // -[a.-1 ]prednK // .
by rewrite -subn1 subn_gt0.
congr (u _ _).
by apply /val_eqP; rewrite /= !inordK.
rewrite codom_subC.8ee codom (ti (k %/ 3 )) \subset [:: a[p1, p3] k; p2]
84a
case : (sitiH ((k %/ 3 ))) => /= [|_].
by rewrite -[a.-1 ]prednK // -ltnS prednK.8ee codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
(`d[↓[u (inord (k %/ 3 ))], si (k %/ 3 )]_smove +
(`d[si (k %/ 3 ), ti (k %/ 3 )]_smove +
(`d[ti (k %/ 3 ), ↓[u (inord (k %/ 3 ).+1 )]]_smove + 0 ))).+2 ->
codom (ti (k %/ 3 )) \subset [:: a[p1, p3] k; p2]
84a
set pp := u _ _; (suff <- : pp = a[p1, p3] k by []); rewrite {}/pp.8ee u (inord (k %/ 3 )) ldisk = a[p1, p3] k
84a
set i := inord _; have <- : a[p1, p3] i = a[p1, p3] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 8c2 8ef i := inord (k %/ 3 ) : 'I_l.+2
904
have k3mH2 : k %% 3 = 2 .
have := ltn_mod k 3 ; move : k3mH k3mH1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 93e
k %% 3 <> 0 ->
k %% 3 <> 1 -> (k %% 3 < 3 ) = (0 < 3 ) -> k %% 3 = 2
945
by case : modn => // [] [|[]].
rewrite (divn_eq k 3 ) k3mH2 addn2 !apegS mulnC apegMr //.947 a[p1, p3] i = a[p1, p3] (k %/ 3 )
93f
by rewrite /i !inordK ?apegS //= !ltnS (leq_trans k3La).
have H2 : (k %/ 3 ) < l.+2 by rewrite !ltnS (leq_trans k3La).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 848 852 853 85c 867 874 892 8b5 8c2 8ef 93e H2 : k %/ 3 < l.+2
907 84a
rewrite -(@aMin1 i); last by rewrite !inordK // -{2 }[a]prednK .
congr (u _ _).
by apply /val_eqP; rewrite /= !inordK.
have {cH2}P2 := IH p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0 cH2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
sp (n:=n.+1 ) (u1 ord0) (3 * a).-2 ( a[p1, p3] 0 ) +
sp (n:=n.+1 ) (u1 ord_max)
(3 * a).-2 ( a[p1, p3] (3 * a).-2 )
843 5c5
have a3B2_gt1 : 1 < (3 * a).-2 .
rewrite -subn2 leq_subRL.
by rewrite (leq_trans (_ : 4 <= 3 * 2 )) // leq_mul2l.
by rewrite (leq_trans (_ : 2 <= 3 * 2 )) // leq_mul2l.
rewrite u10E uiME apeg0 in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
sp (n:=n.+1 ) ↓[u ord0] (3 * a).-2 p1 +
sp (n:=n.+1 ) sam1 (3 * a).-2
( a[p1, p3] (3 * a).-2 )
843 5c5
have {}P2 := leq_trans P2 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leqnn _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) sam1 (3 * a).-2
( a[p1, p3] (3 * a).-2 )
843 5c5
pose pa := a[p1, p3] a; pose paS := a[p1, p3] a.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 989 pa := a[p1, p3] a : peg 4
paS := a[p1, p3] a.+1 : peg 4
843 5c5
have cH3 (k : 'I_3) :
0 < k < 2 -> codom (u2 k) \subset [:: paS; a[p2, pa] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 989 98e 98f k : 'I_3
0 < k < 2 ->
codom (u2 k) \subset [:: paS; a[p2, pa] k]
case : k => [] [|[|]] //= iH _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 989 98e 98f iH : 1 < 3
codom (u2 (Ordinal (n:=3 ) (m:=1 ) iH)) \subset
[:: paS; a[p2, pa] 1 ]
996
by rewrite /pa /paS !apegS apeg0 ffunE /= codom_apeg codom_subC.
rewrite -/x1P1 in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 999 P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
x1P1 +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) sam1 (3 * a).-2
( a[p1, p3] (3 * a).-2 )
843 5c5
have {cH3}P3 :
(S_[2 ] n.+1 ).*2 <= sd u2 + sp (u2 ord0) 2 (a[p2, pa] 0 ) +
sp (u2 ord_max) 2 (a[p2, pa] 2 ).9a6 (S_[2 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) (u2 ord0) 2 ( a[p2, pa] 0 ) +
sp (n:=n.+1 ) (u2 ord_max) 2 ( a[p2, pa] 2 )
apply : IH cH3 => //; try by rewrite /pa /paS // eq_sym.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7
paS != pa
9ac
by rewrite /pa /paS apegS apeg_eqC eq_sym.
rewrite !ffunE /= apeg0 -/x2P1 in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7 P3 : (S_[2 ] n.+1 ).*2 <=
x2P1 + sp (n:=n.+1 ) sam1 2 p2 +
sp (n:=n.+1 ) ↓[u ai] 2 ( a[p2, pa] 2 )
843 5c5
have cH4 (k : 'I_b.+1 ) :
0 < k < b -> codom (u3 k) \subset [:: p2; a[pa, paS] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7 9bc k : 'I_b.+1
0 < k < b ->
codom (u3 k) \subset [:: p2; a[pa, paS] k]
rewrite /b .9c0 0 < k < l.+1 - a ->
codom (u3 k) \subset [:: p2; a[pa, paS] k]
9c3
move => /andP[k_gt0 kLb].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7 9bc 9c1 852 kLb : k < l.+1 - a
codom (u3 k) \subset [:: p2; a[pa, paS] k]
9c3
have kBound : 0 < k + a < l.+1 .
rewrite (leq_trans a_gt0) ?leq_addl //=.
by move : kLb; rewrite /b ltn_subRL addnC.
rewrite ffunE codom_liftr //.9d7 codom (u (inord (k + a))) \subset
[:: p2; a[pa, paS] k]
9c3
have := @cH (inord (k + a)).9d7 (0 < inord (k + a) < l.+1 ->
codom (u (inord (k + a))) \subset
[:: p2; a[p1, p3] (inord (k + a))]) ->
codom (u (inord (k + a))) \subset
[:: p2; a[pa, paS] k]
9c3
rewrite /pa /paS apegS inordK; first by rewrite -apegD; apply .
by rewrite ltnW // ltnS; case /andP: kBound.
have {cH4}P4 :
(S_[b] n.+1 ).*2 <= sd u3 + sp (u3 ord0) b (a[pa, paS] 0 ) +
sp (u3 ord_max) b (a[pa, paS] b).9c5 (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 +
sp (n:=n.+1 ) (u3 ord0) b ( a[pa, paS] 0 ) +
sp (n:=n.+1 ) (u3 ord_max) b ( a[pa, paS] b)
apply : IH cH4 => //; try by rewrite /pa /paS // eq_sym.
by rewrite /pa /paS apegS apeg_eqC.
have {}P4 := leq_trans P4 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7 9bc P4 : (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 +
sp (n:=n.+1 ) (u3 ord0) b ( a[pa, paS] 0 ) +
\sum_(k < n.+1 )
(u3 ord_max k != a[pa, paS] b) * (α_[1 ] k).*2
843 5c5
rewrite apeg0 /= (_ : a[_, _] b = a[p3, p1] l) in P4; last first .9bb a[pa, paS] b = a[p3, p1] l
by rewrite /pa /paS apegS -apegD subnK ?apegS .
rewrite !ffunE /= add0n -/ai in P4.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9a7 9bc P4 : (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) ↓[u ai] b pa +
\sum_(k < n.+1 )
(↓[u (inord (b + a))] k != a[p3, p1] l) *
(α_[1 ] k).*2
843 5c5
rewrite -/x3P1 subnK // (_ : inord l.+1 = ord_max) in P4; last first .
by apply /val_eqP; rewrite /= inordK.
rewrite [X in _ <= _ + X + _]sum_beta_S //= KH1 eqxx addn0.a19 (S_[l.+1 ] n.+2 ).*2 <=
xP1 +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
5c5
set xS := \sum_(_ < _) _ in P2; rewrite -/xS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9bc a1a xS := \sum_(H < n.+1 ) (↓[u ord0] H != p1) * (α_[1 ] H).*2 : nat
P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
x1P1 + xS +
sp (n:=n.+1 ) sam1 (3 * a).-2
( a[p1, p3] (3 * a).-2 )
(S_[l.+1 ] n.+2 ).*2 <=
xP1 + xS +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
5c5
rewrite [X in _ <= _ + _ + X]sum_beta_S //= KH2 mul1n.a25 (S_[l.+1 ] n.+2 ).*2 <=
xP1 + xS +
(\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
α_[l.+1 ] n.+1 )
5c5
set yS := \sum_(_ < _) _ in P4; rewrite -/yS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f 9bc a26 a27 yS := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) * (α_[1 ] H).*2 : nat
P4 : (S_[b] n.+1 ).*2 <=
x3P1 + sp (n:=n.+1 ) ↓[u ai] b pa + yS
(S_[l.+1 ] n.+2 ).*2 <= xP1 + xS + (yS + α_[l.+1 ] n.+1 )
5c5
set x1S := sp _ _ _ in P2; set y1S := sp _ _ _ in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a32 x1S := sp (n:=n.+1 ) sam1 (3 * a).-2
( a[p1, p3] (3 * a).-2 ) : nat
P2 : (S_[(3 * a).-2 ] n.+1 ).*2 <= x1P1 + xS + x1S
y1S := sp (n:=n.+1 ) sam1 2 p2 : nat
P3 : (S_[2 ] n.+1 ).*2 <=
x2P1 + y1S +
sp (n:=n.+1 ) ↓[u ai] 2 ( a[p2, pa] 2 )
a33 5c5
have x1Sy1SE : x1S + y1S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 2 ] n.a37 x1S + y1S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 2 ] n
apply : sum_alpha_diffE => //.a37 codom sam1 \subset [:: a[p1, p3] (3 * a).-2 ; p2]
a40
rewrite apeg32E //.a37 codom sam1 \subset [:: a[p1, p3] a; p2]
a40
by move : sam1C; rewrite -uiME uaiLEp2.
rewrite (maxn_idPl _) // in x1Sy1SE.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a32 a38 a39 a3a a3b x1Sy1SE : x1S + y1S <= (S_[1 ] n).*2 + α_[(3 * a).-2 ] n
a33 5c5
set x2S := sp _ _ _ in P3; set y2S := sp _ _ _ in P4.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a39 a3a a53 x2S := sp (n:=n.+1 ) ↓[u ai] 2 ( a[p2, pa] 2 ) : nat
P3 : (S_[2 ] n.+1 ).*2 <= x2P1 + y1S + x2S
y2S := sp (n:=n.+1 ) ↓[u ai] b pa : nat
P4 : (S_[b] n.+1 ).*2 <= x3P1 + y2S + yS
a33 5c5
have x2y2SE : x2S + y2S <= (S_[1 ] n).*2 + α_[maxn 2 b] n.a57 x2S + y2S <= (S_[1 ] n).*2 + α_[maxn 2 b] n
apply : sum_alpha_diffE => //; first by rewrite /pa eq_sym.a57 codom ↓[u ai] \subset [:: a[p2, pa] 2 ; pa]
a60
have /H : 0 < (inord a : 'I_l.+2 ) < l.+1 by rewrite inordK // a_gt0.a57 codom (u' (inord a)) \subset
[:: p2; a[p1, p3] (inord a)] ->
codom ↓[u ai] \subset [:: a[p2, pa] 2 ; pa]
a60
by rewrite ffunE inordK.
rewrite -addnn {1 }dsum_alphaL_S in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a59 a5a a5b a63 P2 : S_[(3 * a).-2 ] n + α_[(3 * a).-2 ] n +
S_[(3 * a).-2 ] n.+1 <= x1P1 + xS + x1S
a33 5c5
rewrite -addnn {1 }dsum_alphaL_S in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 P3 : S_[2 ] n + α_[2 ] n + S_[2 ] n.+1 <=
x2P1 + y1S + x2S
a33 5c5
rewrite -addnn {1 }dsum_alphaL_S.a77 S_[l.+1 ] n.+1 + α_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <=
xP1 + xS + (yS + α_[l.+1 ] n.+1 )
5c5
have F4 k : S_[a.-1 ] k.+1 <= S_[(3 *a).-2 ] k + a.-1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 k : nat
S_[a.-1 ] k.+1 <= S_[(3 * a).-2 ] k + a.-1
apply : leq_trans (dsum_alpha3l _ _) _.a80 S_[3 * a.-1 ] k + a.-1 <= S_[(3 * a).-2 ] k + a.-1
a83
rewrite leq_add2r.a80 S_[3 * a.-1 ] k <= S_[(3 * a).-2 ] k
a83
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[a]prednK // mulnS addSn add2n /=.
have F4n := F4 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a86 F4n : S_[a.-1 ] n.+1 <= S_[(3 * a).-2 ] n + a.-1
a7c 5c5
have {F4}F4n1 := F4 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 F4n1 : S_[a.-1 ] n.+2 <= S_[(3 * a).-2 ] n.+1 + a.-1
a7c 5c5
have F5 k :
S_[l.+1 ] k.+1 + S_[1 ] k.+1 + S_[b.+1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1 + S_[b] k + (α_[1 ] k).*2 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e a81
S_[l.+1 ] k.+1 + S_[1 ] k.+1 + S_[b.+1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1 + S_[b] k + (α_[1 ] k).*2
have <- : a + b = l.+1 by rewrite addnC subnK.aa2 S_[a + b] k.+1 + S_[1 ] k.+1 + S_[b.+1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1 + S_[b] k + (α_[1 ] k).*2
aa4
rewrite -[X in _ <= X]addnA (leq_add _ (dsum_alphaL_alpha k b_gt1)) //.aa2 S_[a + b] k.+1 + S_[1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1
aa4
have := concaveEk1 1 a.-2 b.+1 (concave_dsum_alphaL_l k.+1 ).aa2 S_[1 + a.-2 + b.+1 ] k.+1 + S_[1 ] k.+1 <=
S_[1 + b.+1 ] k.+1 + S_[1 + a.-2 ] k.+1 ->
S_[a + b] k.+1 + S_[1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1
aa4
rewrite add1n prednK; last by rewrite -subn1 ltn_subRL addn0.aa2 S_[a.-1 + b.+1 ] k.+1 + S_[1 ] k.+1 <=
S_[1 + b.+1 ] k.+1 + S_[a.-1 ] k.+1 ->
S_[a + b] k.+1 + S_[1 ] k.+1 <=
S_[a.-1 ] k.+1 + S_[b.+2 ] k.+1
aa4
by rewrite -addSnnS prednK // add1n [X in _ <= X]addnC.
have F5n := F5 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e aa7 F5n : S_[l.+1 ] n.+1 + S_[1 ] n.+1 + S_[b.+1 ] n.+1 <=
S_[a.-1 ] n.+1 + S_[b.+2 ] n.+1 + S_[b] n +
(α_[1 ] n).*2
a7c 5c5
have {F5}F5n1 := F5 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf F5n1 : S_[l.+1 ] n.+2 + S_[1 ] n.+2 + S_[b.+1 ] n.+2 <=
S_[a.-1 ] n.+2 + S_[b.+2 ] n.+2 + S_[b] n.+1 +
(α_[1 ] n.+1 ).*2
a7c 5c5
have F6 k : S_[b.+2 ] k + S_[1 ] k <= S_[b.+1 ] k + S_[2 ] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 a81
S_[b.+2 ] k + S_[1 ] k <= S_[b.+1 ] k + S_[2 ] k
by have := concaveEk1 1 1 b (concave_dsum_alphaL_l k).
have F6n := F6 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 acd F6n : S_[b.+2 ] n.+1 + S_[1 ] n.+1 <=
S_[b.+1 ] n.+1 + S_[2 ] n.+1
a7c 5c5
have {F6}F6n1 := F6 n.+2 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 F6n1 : S_[b.+2 ] n.+2 + S_[1 ] n.+2 <=
S_[b.+1 ] n.+2 + S_[2 ] n.+2
a7c 5c5
have F72 := dsum_alphaL_S 2 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 ada F72 : S_[2 ] n.+2 = S_[2 ] n.+1 + α_[2 ] n.+1
a7c 5c5
have F721 := dsum_alphaL_S 2 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 ada adf F721 : S_[2 ] n.+1 = S_[2 ] n + α_[2 ] n
a7c 5c5
have F711 := dsum_alphaL_S 1 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 ada adf ae4 F711 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
a7c 5c5
have F71 := dsum_alphaL_S 1 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 ada adf ae4 ae9 F71 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
a7c 5c5
have F73 := dsum_alphaL_S b n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a53 a58 a5a a5b a63 a73 a78 a99 a9e abf ac4 ad5 ada adf ae4 ae9 aee F73 : S_[b] n.+1 = S_[b] n + α_[b] n
a7c 5c5
have F8 : α_[2 ] n.+1 <= α_[1 ] n.+2 .af2 α_[2 ] n.+1 <= α_[1 ] n.+2
have ->: α_[1 ] n.+2 = α_[3 ] n.+1 by rewrite alphaL_3E.af2 α_[2 ] n.+1 <= α_[3 ] n.+1
af8
by apply : increasing_alphaL_l.
have F9 : α_[1 ] (n.+2 ) <= (α_[1 ] n).*2 .+2 .afa α_[1 ] n.+2 <= (α_[1 ] n).*2 .+2
apply : leq_trans (leqnSn _).afa α_[1 ] n.+2 <= (α_[1 ] n).*2 .+1
b07
by apply : alphaL_4_5.
rewrite (maxn_idPr _) // in x1Sy1SE x2y2SE.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be 5c3 5c4 5cc 5d1 5d9 5eb 5f0 5f9 630 635 63d 63f 66a 67b 683 692 6a2 6a7 836 837 83d 83e 83f 972 98e 98f a26 a31 a38 a3a a58 a5a a5b a73 a78 a99 a9e abf ac4 ad5 ada adf ae4 ae9 aee af3 afb b0a a53 x2y2SE : x2S + y2S <= (S_[1 ] n).*2 + α_[b] n
a7c 5c5
by lia .
rewrite negb_and -leqNgt -ltnNge => oH.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be oH : (a <= 1 ) || (l.-1 < a)
573
have [/andP[a_gt1 /eqP bE1]|] := boolP ((1 < a) && (b == 1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 bE1 : b = 1
573
(* 2 <= a and b = 1 *)
have am1_gt0 : 0 < a.-1 by rewrite -subn1 subn_gt0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 am1_gt0 : 0 < a.-1
573 b24
have lEa : l = a.
have : a + b = l.+1 by rewrite addnC subnK //.b2a a + b = l.+1 -> l = a
b30
by rewrite bE1 addn1 => [] [].
have uaiLEp2 : u ai ldisk = p2.
have /cH/subsetP/(_ (u ai ldisk) (codom_f _ _)) : 0 < ai < l.+1 .
by rewrite aiE a_gt0 lEa /=.
by rewrite !inE aiE (negPf aH) orbF => /eqP.
pose si i : configuration 4 n.+1 :=
sgdist1 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb
573 b24
pose ti i : configuration 4 n.+1 :=
sgdist2 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0
573 b24
have sitiH i : i < a.-1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 14a
5f5
move => iLa.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 14a 5fe
5ff b58
have iLa1 : i < a by rewrite (leq_trans iLa) // ssrnat.leq_pred.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 14a 5fe 604
5ff b58
apply : sgdistE => //.
- b64
by rewrite aMin1.
- b6d
rewrite !aMin1 //; last by rewrite -[a]prednK.
by rewrite apegS apeg_eqC.
- b75
by rewrite aMin1 1 ?eq_sym // -[a]prednK.
- b7a
by rewrite aMin1.
by rewrite aMin1 // -[a]prednK.
pose pa := a[p1, p3] a.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e
573 b24
pose sam1 : configuration 4 n.+1 := sgdist1 pa (u (inord a.-1 )) (u (inord a)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e sam1 := sgdist1 (n:=n.+1 ) pa (u (inord a.-1 ))
(u (inord a))
: configuration 4 n.+1 : configuration 4 n.+1
573 b24
pose tam1 : configuration 4 n.+1 := sgdist2 pa (u (inord a.-1 )) (u (inord a)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c tam1 := sgdist2 (n:=n.+1 ) pa (u (inord a.-1 ))
(u (inord a))
: configuration 4 n.+1 : configuration 4 n.+1
573 b24
have [sam1C tam1C duam1ua1E] :
[/\ codom sam1 \subset [:: pa; u (inord a) ldisk ],
codom tam1 \subset [:: u (inord a.-1 ) ldisk; pa] &
`d[u (inord a.-1 ), u (inord a)]_smove =
D[[:: ↓[u (inord a.-1 )]; sam1; tam1; ↓[u (inord a)]]].+2 ].b90 [/\ codom sam1 \subset [:: pa; u (inord a) ldisk],
codom tam1 \subset [:: u (inord a.-1 ) ldisk; pa]
& `d[u (inord a.-1 ), u (inord a)]_smove =
D[[:: ↓[u (inord a.-1 )]; sam1; tam1;
↓[u (inord a)]]].+2 ]
apply : sgdistE; rewrite /pa //.
- b9c
by rewrite aMin1 ?prednK // -{2 }[a]prednK //= apegS apeg_eqC.
- ba5
by rewrite uaiLEp2 aMin1 // prednK.
- baa
by rewrite uaiLEp2.
- baf
by rewrite aMin1 // prednK.
by rewrite uaiLEp2.
have {}tam1C : codom tam1 \subset [:: p1; p3].
move : tam1C; rewrite aMin1; last by rewrite -{2 }[a]prednK.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f
codom tam1 \subset [:: a[p1, p3] a.-1 ; pa] ->
codom tam1 \subset [:: p1; p3]
bbc
by rewrite /pa -{2 }[a]prednK // apegS codom_apeg.
pose u1 :=
[ffun i =>
if ((i : 'I_(3 * a).-2 .+1 ) == 3 * a.-1 :>nat) then ↓[u (inord a.-1 )]
else if (i == (3 * a.-1 ).+1 :>nat) then sam1
else if (i %% 3 ) == 0 then ↓[u (inord (i %/ 3 ))]
else if (i %% 3 ) == 1 then si (i %/ 3 )
else ti (i %/ 3 )].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b
573 b24
have u10E : u1 ord0 = ↓[u ord0].
rewrite ffunE /= ifN ?inord_eq0 //.
by rewrite neq_ltn muln_gt0 /= -ltnS prednK //= a_gt1.
have uiME : u1 ord_max = sam1.
rewrite ffunE /= eqn_leq leqNgt -{2 }[a]prednK // mulnS.
rewrite addSn add2n ltnS leqnn /=.
by rewrite -{1 }[a]prednK // mulnS eqxx.
pose u2 :=
[ffun i : 'I_4 =>
if i == 0 :> nat then sam1 else
if i == 1 :> nat then tam1 else
if i == 2 :> nat then ↓[u ai] else ↓[u (inord (l.+1 ))]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 u2 := [ffun i => if i == 0 :> nat
then sam1
else
if i == 1 :> nat
then tam1
else
if i == 2 :> nat
then ↓[u ai]
else ↓[u (inord l.+1 )]] : {ffun forall x : ordinal_finType 4 ,
(fun => configuration 4 n.+1 ) x}
573 b24
have P1 : a.*2 + sd u1 + sd u2 <= sd u.be9 a.*2 + sd (n:=n.+1 ) u1 + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
have G b1 : b1 = a ->
\sum_(i < (3 * b1).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < (3 * a.-1 )) `d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 6b4
6b5
move => b1Ea.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 6b4 6be
6bf bf7
have ta2E : (3 * b1).-2 = (3 * a.-1 ).+1 .
by rewrite b1Ea -{1 }[a]prednK // mulnS.
rewrite ta2E big_ord_recr /=; congr (_ + `d[_,_]_smove).
by rewrite ffunE ifT// inordK // -{2 }b1Ea ?ta2E .
rewrite ffunE inordK; last by rewrite -{2 }b1Ea ?ta2E .
by rewrite eqn_leq ltnn /= eqxx.
rewrite {}[sd u1]G //.be9 a.*2 +
(\sum_(i < 3 * a.-1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
bef
have -> := @sum3E _ (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_smove).be9 a.*2 +
(\sum_(i < a.-1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
bef
have -> : a.*2 = 2 + \sum_(i < a.-1 ) 2 .
rewrite sum_nat_const /= cardT size_enum_ord.
by rewrite muln2 -(doubleD 1 ) add1n prednK.be9 2 + \sum_(i < a.-1 ) 2 +
(\sum_(i < a.-1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) +
`d[↓[u (inord a.-1 )], sam1]_smove) + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
bef
rewrite !addnA -[2 + _ + _]addnA -big_split /=.be9 2 +
\sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
`d[↓[u (inord a.-1 )], sam1]_smove + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
bef
rewrite [sd u2]big_ord_recr /=.be9 2 +
\sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
`d[↓[u (inord a.-1 )], sam1]_smove +
(\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove +
`d[u2 (inord 2 ), u2 (inord 3 )]_smove) <=
sd (n:=n.+2 ) u
bef
rewrite [u2 (inord 2 )]ffunE inordK //=.be9 2 +
\sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
`d[↓[u (inord a.-1 )], sam1]_smove +
(\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove +
`d[↓[u ai], u2 (inord 3 )]_smove) <= sd (n:=n.+2 ) u
bef
rewrite [u2 (inord 3 )]ffunE inordK //=.be9 2 +
\sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
`d[↓[u (inord a.-1 )], sam1]_smove +
(\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove +
`d[↓[u ai], ↓[u (inord l.+1 )]]_smove) <=
sd (n:=n.+2 ) u
bef
rewrite [2 + _]addnC -!addnA 2 ![X in _ + X <= _]addnA addnA.be9 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
(2 + `d[↓[u (inord a.-1 )], sam1]_smove +
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove) +
`d[↓[u ai], ↓[u (inord l.+1 )]]_smove <= sd (n:=n.+2 ) u
bef
have -> : sd u =
\sum_(i < a.-1 ) (`d[u (inord i), u (inord i.+1 )]_smove) +
`d[u (inord a.-1 ), u ai]_smove + `d[u ai, u (inord ai.+1 )]_smove.be9 sd (n:=n.+2 ) u =
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
`d[u ai, u (inord ai.+1 )]_smove
rewrite -lEa (_ : ai = inord l); last first .
by apply /val_eqP; rewrite /= aiE inordK // lEa.
case : l l_gt0 u => //= l1 _ f.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea l1 : nat
f : {ffun 'I_l1.+3 -> configuration 4 n.+2 }
sd (n:=n.+2 ) f =
\sum_(i < l1) `d[f (inord i), f (inord i.+1 )]_smove +
`d[f (inord l1), f (inord l1.+1 )]_smove +
`d[f (inord l1.+1 ), f (inord (inord l1.+1 ).+1 )]_smove
c42
rewrite /sd 2 !big_ord_recr //=; congr (_ + _ + `d[f _, f _]_smove).c52 inord l1.+2 = inord (inord l1.+1 ).+1
c42
by apply /val_eqP; rewrite /= !inordK.be9 \sum_(i < a.-1 )
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) +
(2 + `d[↓[u (inord a.-1 )], sam1]_smove +
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove) +
`d[↓[u ai], ↓[u (inord l.+1 )]]_smove <=
\sum_(i < a.-1 ) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord a.-1 ), u ai]_smove +
`d[u ai, u (inord ai.+1 )]_smove
bef
apply : leq_add; first apply : leq_add.
- c5f
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.
apply : eq_bigr => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 738
739 c61
have -> : u1 (inord (3 * i)) = ↓[u (inord i)].
rewrite ffunE inordK; last first .
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite leq_mul2l /= ltnW.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.
rewrite eqn_mul2l /= eqn_leq [_ <= i]leqNgt ltn_ord andbF.
rewrite eqn_leq ltn_mul2l /= ltnNge [i <= _]ltnW // andbF.
by rewrite mod3E /= div3E.
have -> : u1 (inord (3 * i).+1 ) = si i.
rewrite ffunE inordK; last first .
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite ltn_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.
rewrite eqn_leq [_ <= _.+1 ]leqNgt.
rewrite (leq_trans (_ : (3 * i).+2 <= (3 * i.+1 ))) ?andbF //;
last 2 first .
- ca3
by rewrite mulnS addSn add2n.
- caa
by rewrite leq_mul2l /=.
rewrite eqn_leq !ltnS [_ <= 3 * i]leq_mul2l.
by rewrite [_ <= i]leqNgt ltn_ord andbF mod3E /= div3E.
have -> : u1 (inord (3 * i).+2 ) = ti i.
rewrite ffunE inordK; last first .
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
rewrite (leq_trans (_ : _ <= 3 * (i.+1 ))) //.
by rewrite mulnS addSn add2n.
by rewrite leq_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.
rewrite eqn_leq [_ <= _.+1 ]leqNgt.
rewrite -[(3 * i).+3 ](mulnDr 3 1 i) leq_mul2l ltn_ord andbF.
rewrite eqn_leq !ltnS [_ <= _.+1 ]leqNgt.
rewrite (leq_trans (_ : (3 * i).+1 < 3 * (i.+1 ))) ?andbF //;
last 2 first .
- cd9
by rewrite mulnS addSn add2n.
- cde
by rewrite leq_mul2l /=.
by rewrite mod3E /= div3E.
have -> : u1 (inord (3 * i).+3 ) = ↓[u (inord i.+1 )].
have -> : (3 * i).+3 = 3 * (i.+1 ) by rewrite mulnS addSn add2n.
rewrite ffunE inordK; last first .
rewrite ltnS (leq_trans (_ : _ <= 3 * (a.-1 ))) //.
by rewrite leq_mul2l /=.
by rewrite -{2 }[a]prednK // mulnS addSn add2n /= ltnW.
rewrite eqn_mul2l /=; case : eqP => [->//|_].
rewrite eqn_leq [_ <= 3 * i.+1 ]leqNgt ltnS leq_mul2l /= ltn_ord andbF.
by rewrite mod3E /= div3E.
case : (sitiH i) => //= _ _.c6d `d[u (inord i), u (inord i.+1 )]_smove =
(`d[↓[u (inord i)], si i]_smove +
(`d[si i, ti i]_smove +
(`d[ti i, ↓[u (inord i.+1 )]]_smove + 0 ))).+2 ->
2 +
(`d[↓[u (inord i)], si i]_smove + `d[si i, ti i]_smove +
`d[ti i, ↓[u (inord i.+1 )]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
c61
by rewrite !addnA addn0 add2n.
- d0a
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.be9 2 + `d[↓[u (inord a.-1 )], sam1]_smove +
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove =
`d[u (inord a.-1 ), u ai]_smove
d0c
rewrite !big_ord_recr big_ord0 //= add0n !addnA.
have -> : u2 (inord 0 ) = sam1 by rewrite ffunE /= inordK.
have -> : u2 (inord 1 ) = tam1 by rewrite ffunE /= inordK.
have -> : u2 (inord 2 ) = ↓[u ai] by rewrite ffunE /= inordK.
by move : duam1ua1E; rewrite /= addn0 add2n !addnA !addSn.
rewrite (_ : inord l.+1 = inord ai.+1 ); last first .be9 inord l.+1 = inord ai.+1
by apply /val_eqP; rewrite /= !inordK // lEa.
by apply /gdist_cunlift/shanoi_connect.
set x1P1 := sd _ in P1; set x2P1 := sd _ in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 P1 : a.*2 + x1P1 + x2P1 <= sd (n:=n.+2 ) u
573 b24
set xP1 := sd _ in P1; rewrite -/xP1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e P1 : a.*2 + x1P1 + x2P1 <= xP1
843 b24
have cH2 (k : 'I_(3 * a).-2 .+1 ) :
0 < k < (3 * a).-2 -> codom (u1 k) \subset [:: p2; a[p1, p3] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848
849
move => /andP[k_gt0 k_lt].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853
854 d3c
have kL3a1 : k <= (3 * a.-1 ).
by rewrite -ltnS (leq_trans k_lt) // -{1 }[a]prednK // mulnS.
have kLa1 : k %/ 3 <= a.-1 .
by rewrite -(mulKn a.-1 (isT : 0 < 3 )) leq_div2r.
rewrite ffunE; case : eqP => [kH|/eqP kH].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 86f
870
rewrite kH apegMr //.
have := @H (inord a.-1 ); rewrite inordK //.
rewrite ffunE; apply .
by rewrite -ltnS prednK // a_gt1.
by rewrite prednK // (leq_trans aLld1).
have k3La2 : k %/ 3 <= a.-2 .
rewrite -ltnS [a.-2 .+1 ]prednK //.
rewrite ltn_divLR // [_ * 3 ]mulnC.
by move : kL3a1 kH; case : ltngtP.
rewrite eqn_leq [_ <= k]leqNgt (leq_trans k_lt) ?andbF //; last first .
by rewrite -{1 }[a]prednK // mulnS addSn add2n.
have k3La : k %/ 3 <= a.
by rewrite (leq_trans kLa1) // -subn1 leq_subr.
case : eqP => k3mH.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8bd
8be
apply : codom_liftr.
rewrite {2 }(divn_eq k 3 ) k3mH addn0 [in a[_,_] _]mulnC apegMr //.
have := @cH (inord (k %/3 )); rewrite inordK; last first .
by rewrite (leq_ltn_trans k3La).
apply .
rewrite (leq_ltn_trans k3La) ?ltnS ?lEa //.
move : k_gt0; rewrite andbT {1 }(divn_eq k 3 ) k3mH addn0 muln_gt0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 853 85c 867 874 892 8b5 8bd
8e2 d91
by case /andP.
case : eqP => k3mH1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8c2 8ea
8eb
case : (sitiH (k %/ 3 )); first by rewrite -[a.-1 ]prednK.db2 codom (si (k %/ 3 )) \subset
[:: p2; u (inord (k %/ 3 ).+1 ) ldisk] ->
codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (si (k %/ 3 )) \subset [:: p2; a[p1, p3] k]
db3
set pp := u _ _; (suff <- : pp = a[p1, p3] k by []); rewrite {}/pp.
set i := inord _; have <- : a[p1, p3] i = a[p1, p3] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8c2 8ea 903
904
rewrite (divn_eq k 3 ) k3mH1 addn1 apegS mulnC apegMr //.
by rewrite /i !inordK ?apegS //= !ltnS lEa.
have H2 : (k %/ 3 ).+1 < l.+2 by rewrite !ltnS lEa (leq_trans k3La).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8c2 8ea 903 913
907 db3
rewrite -(@aMin1 i); last first .
by rewrite !inordK // -{2 }[a]prednK // ltnS // -[a.-1 ]prednK.
congr (u _ _).
by apply /val_eqP; rewrite /= !inordK.
rewrite codom_subC.
case : (sitiH (k %/ 3 )) => [|_]; first by rewrite -[a.-1 ]prednK.db5 codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (ti (k %/ 3 )) \subset [:: a[p1, p3] k; p2]
d3c
set pp := u _ _; (suff <- : pp = a[p1, p3] k by []); rewrite {}/pp.
set i := inord _; have <- : a[p1, p3] i = a[p1, p3] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8c2 8ef 93e
904
have k3mH2 : k %% 3 = 2 .
have := ltn_mod k 3 ; move : k3mH k3mH1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 93e
94d dee
by case : modn => // [] [|[]].
rewrite (divn_eq k 3 ) k3mH2 addn2 !apegS mulnC apegMr //.
by rewrite /i !inordK ?apegS //= !ltnS (leq_trans k3La).
have H2 : (k %/ 3 ) < l.+2 by rewrite !ltnS (leq_trans k3La).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 848 852 853 85c 867 874 892 8b5 8c2 8ef 93e 95c
907 d3c
rewrite -(@aMin1 i); last by rewrite !inordK // -{2 }[a]prednK .
congr (u _ _).
by apply /val_eqP; rewrite /= !inordK.
have {cH2}P2 := IH p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0 cH2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 96a
843 b24
have a3B2_gt1 : 1 < (3 * a).-2 .
rewrite -subn2 leq_subRL.
by rewrite (leq_trans (_ : 4 <= 3 * 2 )) // leq_mul2l.
by rewrite (leq_trans (_ : 2 <= 3 * 2 )) // leq_mul2l.
rewrite u10E uiME apeg0 in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 984
843 b24
have {}P2 := leq_trans P2 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leqnn _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 989
843 b24
rewrite -/x1P1 in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7
843 b24
pose paS := a[p1, p3] a.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7 98f
843 b24
have cH3 (k : 'I_4) :
0 < k < 3 -> codom (u2 k) \subset [:: pa; a[p2, paS] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7 98f k : 'I_4
0 < k < 3 ->
codom (u2 k) \subset [:: pa; a[p2, paS] k]
case : k => [] [|[|[|]]] //= iH _; rewrite ffunE /=.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7 98f iH : 1 < 4
codom tam1 \subset [:: pa; a[p2, paS] 1 ]
by have := tam1C; rewrite /pa /paS !(apegS, apeg0) codom_apeg.
apply : codom_liftr.e42 codom (u ai) \subset [:: pa; a[p2, paS] 2 ]
e36
have /cH : 0 < ai < l.+1 by rewrite aiE a_gt0 // lEa /=.e42 codom (u ai) \subset [:: p2; a[p1, p3] ai] ->
codom (u ai) \subset [:: pa; a[p2, paS] 2 ]
e36
by rewrite /pa /paS !(apegS, apeg0) aiE codom_subC.
have {cH3}P3 :
(S_[3 ] n.+1 ).*2 <= sd u2 + sp (u2 ord0) 3 (a[p2, paS] 0 ) +
sp (u2 ord_max) 3 (a[p2, paS] 3 ).e38 (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) (u2 ord0) 3 ( a[p2, paS] 0 ) +
sp (n:=n.+1 ) (u2 ord_max) 3 ( a[p2, paS] 3 )
apply : IH cH3 => //; try by rewrite /pa /paS // eq_sym.
by rewrite /paS apegS apeg_eqC.
have {}P3 := leq_trans P3 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7 98f P3 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) (u2 ord0) 3 ( a[p2, paS] 0 ) +
\sum_(k < n.+1 )
(u2 ord_max k != a[p2, paS] 3 ) * (α_[1 ] k).*2
843 b24
rewrite /pa /paS -lEa !(apegS, apeg0) in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 9a7 98f P3 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 + sp (n:=n.+1 ) (u2 ord0) 3 p2 +
\sum_(k < n.+1 )
(u2 ord_max k != a[p3, p1] l) * (α_[1 ] k).*2
843 b24
rewrite !ffunE /= -/x2P1 (_ : inord l.+1 = ord_max) in P3; last first .
by apply /val_eqP; rewrite /= inordK.
rewrite [X in _ <= _ + X + _]sum_beta_S //= KH1 eqxx addn0.
set xS := \sum_(_ < _) _ in P2; rewrite -/xS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f e71 a26 a27
a28 b24
rewrite [X in _ <= _ + _ + X]sum_beta_S //= KH2 mul1n.
set yS := \sum_(i < _) _ in P3; rewrite -/yS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 a27 yS := \sum_(i < n.+1 )
(↓[u ord_max] i != a[p3, p1] l) * (α_[1 ] i).*2 : nat
P3 : (S_[3 ] n.+1 ).*2 <=
x2P1 + sp (n:=n.+1 ) sam1 3 p2 + yS
a33 b24
set x1S := sp _ _ _ in P2; set y1S := sp _ _ _ in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 a39 y1S := sp (n:=n.+1 ) sam1 3 p2 : nat
P3 : (S_[3 ] n.+1 ).*2 <= x2P1 + y1S + yS
a33 b24
have x1Sy1SE : x1S + y1S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 3 ] n.e88 x1S + y1S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 3 ] n
apply : sum_alpha_diffE => //.
by move : sam1C; rewrite -uiME uaiLEp2 /pa apeg32E.
rewrite (maxn_idPl _) // in x1Sy1SE; last first .
by rewrite -subn2 ltn_subRL ltnW // (leq_mul2l 3 2 ).
rewrite -addnn {1 }dsum_alphaL_S in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73
a33 b24
rewrite -addnn {1 }dsum_alphaL_S.
have F4 k : S_[a.-1 ] k.+1 <= S_[(3 *a).-2 ] k + a.-1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a81
a82
apply : leq_trans (dsum_alpha3l _ _) _.
rewrite leq_add2r.
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[a]prednK // mulnS addSn add2n /=.
have F4n := F4 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a86 a99
a7c b24
have {F4}F4n1 := F4 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e
a7c b24
have F6 k : S_[a.+1 ] k + S_[1 ] k <= S_[a.-1 ] k + S_[3 ] k.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e a81
S_[a.+1 ] k + S_[1 ] k <= S_[a.-1 ] k + S_[3 ] k
have := concaveEk1 1 a.-2 2 (concave_dsum_alphaL_l k).ec8 S_[1 + a.-2 + 2 ] k + S_[1 ] k <=
S_[1 + 2 ] k + S_[1 + a.-2 ] k ->
S_[a.+1 ] k + S_[1 ] k <= S_[a.-1 ] k + S_[3 ] k
eca
by rewrite add1n addn2 !prednK // [_ + S_[3 ] _]addnC.
have F6n := F6 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ecd F6n : S_[a.+1 ] n.+1 + S_[1 ] n.+1 <=
S_[a.-1 ] n.+1 + S_[3 ] n.+1
a7c b24
have {F6}F6n1 := F6 n.+2 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 F6n1 : S_[a.+1 ] n.+2 + S_[1 ] n.+2 <=
S_[a.-1 ] n.+2 + S_[3 ] n.+2
a7c b24
have F72 := dsum_alphaL_S 3 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 ede F72 : S_[3 ] n.+2 = S_[3 ] n.+1 + α_[3 ] n.+1
a7c b24
have F721 := dsum_alphaL_S 3 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 ede ee3 F721 : S_[3 ] n.+1 = S_[3 ] n + α_[3 ] n
a7c b24
have F711 := dsum_alphaL_S 1 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 ede ee3 ee8 ae9
a7c b24
have F71 := dsum_alphaL_S 1 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 ede ee3 ee8 ae9 aee
a7c b24
have F8 : α_[1 ] n.+2 = α_[3 ] n.+1 by rewrite alphaL_3E.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e 5c3 b23 b2b b33 5d9 5eb 5f0 5f9 98e b8c b91 b99 63f 66a 67b 683 692 bea 836 837 83e d37 972 98f a26 e83 a38 e89 e8a a53 a73 a99 a9e ed9 ede ee3 ee8 ae9 aee F8 : α_[1 ] n.+2 = α_[3 ] n.+1
a7c b24
have F9 : α_[1 ] (n.+2 ) <= (α_[1 ] n).*2 .+2 .
apply : leq_trans (leqnSn _).
by apply : alphaL_4_5.
by subst l; lia .
rewrite negb_and -leqNgt => o1H.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e o1H : (a <= 1 ) || (b != 1 )
573
have [/eqP aE1| aD1] := boolP (a == 1 ).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 aE1 : a = 1
573
have b_gt0 : 0 < b by rewrite /b aE1 subn1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e b_gt0 : 0 < b
573 f0f
have bE : b = l by rewrite /b aE1 subn1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f17 bE : b = l
573 f0f
move : b_gt0; rewrite leq_eqVlt => /orP[/eqP bE1 | b_gt1]; last first .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1
573
have u1C : u (inord 1 ) ldisk = p2.f20 u (inord 1 ) ldisk = p2
move : aH; rewrite aE1 apegS apeg0.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1
u (inord 1 ) ord_max != p3 -> u (inord 1 ) ldisk = p2
f29
have /cH : 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite inordK.f30 codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
u (inord 1 ) ord_max != p3 -> u (inord 1 ) ldisk = p2
f29
move => /subsetP/(_ (u (inord 1 ) ldisk) (codom_f _ _)).f30 u (inord 1 ) ldisk \in [:: p2; a[p1, p3] (inord 1 )] ->
u (inord 1 ) ord_max != p3 -> u (inord 1 ) ldisk = p2
f29
by rewrite !inE => /orP[] /eqP-> //; rewrite !inordK // apegS apeg0 eqxx.
pose s0 : configuration 4 n.+1 := sgdist1 p3 (u ord0) (u (inord 1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c s0 := sgdist1 (n:=n.+1 ) p3 (u ord0) (u (inord 1 ))
: configuration 4 n.+1 : configuration 4 n.+1
573 f21
pose t0 : configuration 4 n.+1 := sgdist2 p3 (u ord0) (u (inord 1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 t0 := sgdist2 (n:=n.+1 ) p3 (u ord0) (u (inord 1 ))
: configuration 4 n.+1 : configuration 4 n.+1
573 f21
have [s0C t0C ds0t0E] :
[/\ codom s0 \subset [:: p3; u (inord 1 ) ldisk ],
codom t0 \subset [:: u ord0 ldisk; p3] &
`d[u ord0, u (inord 1 )]_smove =
D[[:: ↓[u ord0]; s0; t0; ↓[u (inord 1 )]]].+2 ].f45 [/\ codom s0 \subset [:: p3; u (inord 1 ) ldisk],
codom t0 \subset [:: u ord0 ldisk; p3]
& `d[u ord0, u (inord 1 )]_smove =
D[[:: ↓[u ord0]; s0; t0; ↓[u (inord 1 )]]].+2 ]
apply : sgdistE => //.
- f52
by rewrite /= KH1.
- f60
by rewrite KH1 u1C.
- f65
by rewrite u1C eq_sym.
- f6a
by rewrite KH1.
by rewrite u1C.
pose u1 :=
[ffun i : 'I_4 =>
if i == 0 :> nat then ↓[u ord0] else
if i == 1 :> nat then s0 else
if i == 2 :> nat then t0 else ↓[u (inord 1 )]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 u1 := [ffun i => if i == 0 :> nat
then ↓[u ord0]
else
if i == 1 :> nat
then s0
else
if i == 2 :> nat
then t0
else ↓[u (inord 1 )]] : {ffun forall x : ordinal_finType 4 ,
(fun => configuration 4 n.+1 ) x}
573 f21
pose u2 := [ffun i => ↓[u (inord ((i : 'I_b.+1 ) + 1 ))]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 u2 := [ffun i => ↓[u (inord ((i : 'I_b.+1 ) + 1 ))]] : {ffun forall x : ordinal_finType b.+1 ,
(fun => configuration 4 n.+1 ) x}
573 f21
have P1 : 2 + sd u1 + sd u2 <= sd u.f7c 2 + sd (n:=n.+1 ) u1 + sd (n:=n.+1 ) u2 <=
sd (n:=n.+2 ) u
have -> : sd u =
`d[u ord0, u (inord 1 )]_smove +
\sum_(i < b) `d[u (inord (a +i)), u (inord (a + i.+1 ))]_smove.f7c sd (n:=n.+2 ) u =
`d[u ord0, u (inord 1 )]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
rewrite /sd big_ord_recl /= bE.f7c `d[u (inord 0 ), u (inord 1 )]_smove +
\sum_(i < l)
`d[u (inord (bump 0 i)), u (inord (bump 0 i).+1 )]_smove =
`d[u ord0, u (inord 1 )]_smove +
\sum_(i < l)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f8a
congr (`d[u _,u _]_smove + _).
by apply /val_eqP; rewrite /= inordK.f7c \sum_(i < l)
`d[u (inord (bump 0 i)), u (inord (bump 0 i).+1 )]_smove =
\sum_(i < l)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f8a
apply : eq_bigr => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d i : 'I_l
`d[u (inord (bump 0 i)), u (inord (bump 0 i).+1 )]_smove =
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f8a
congr (`d[u _,u _]_smove); apply /val_eqP; rewrite aE1 /= inordK //=.
by rewrite /bump add1n !ltnS ltnW.
by rewrite /bump add1n !ltnS.f7c 2 + sd (n:=n.+1 ) u1 + sd (n:=n.+1 ) u2 <=
`d[u ord0, u (inord 1 )]_smove +
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f82
apply : leq_add.f7c 2 + sd (n:=n.+1 ) u1 <= `d[u ord0, u (inord 1 )]_smove
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.f7c 2 + sd (n:=n.+1 ) u1 = `d[u ord0, u (inord 1 )]_smove
fb4
rewrite /sd !big_ord_recr /= big_ord0 add0n.f7c 2 +
(`d[u1 (inord 0 ), u1 (inord 1 )]_smove +
`d[u1 (inord 1 ), u1 (inord 2 )]_smove +
`d[u1 (inord 2 ), u1 (inord 3 )]_smove) =
`d[u ord0, u (inord 1 )]_smove
fb4
rewrite !ffunE !inordK //= add2n.f7c (`d[↓[u ord0], s0]_smove + `d[s0, t0]_smove +
`d[t0, ↓[u (inord 1 )]]_smove).+2 =
`d[u ord0, u (inord 1 )]_smove
fb4
by rewrite ds0t0E /= addn0 !addnA.f7c sd (n:=n.+1 ) u2 <=
\sum_(i < b)
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f82
apply : leq_sum => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 821
`d[u2 (inord i), u2 (inord i.+1 )]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f82
rewrite ffunE inordK; last by rewrite ltnS ltnW.fca `d[↓[u (inord (i + 1 ))], u2 (inord i.+1 )]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f82
rewrite ffunE inordK; last by rewrite ltnS.fca `d[↓[u (inord (i + 1 ))], ↓[u (inord (i.+1 + 1 ))]]_smove <=
`d[u (inord (a + i)), u (inord (a + i.+1 ))]_smove
f82
rewrite aE1 addSn [i + _]addnC addnS.fca `d[↓[u (inord (1 + i))], ↓[u (inord (1 + i).+1 )]]_smove <=
`d[u (inord (1 + i)), u (inord (1 + i).+1 )]_smove
f82
by apply /gdist_cunlift/shanoi_connect.
set x1P1 := sd _ in P1; set x2P1 := sd _ in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 P1 : 2 + x1P1 + x2P1 <= sd (n:=n.+2 ) u
573 f21
set xP1 := sd _ in P1; rewrite -/xP1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e P1 : 2 + x1P1 + x2P1 <= xP1
843 f21
have cH2 (k : 'I_4) :
0 < k < 3 -> codom (u1 k) \subset [:: p3; a[p1, p2] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 e34
0 < k < 3 ->
codom (u1 k) \subset [:: p3; a[p1, p2] k]
case : k => [] [|[|[|]]] //= iH _; rewrite ffunE /= !(apegS, apeg0).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 e3e
codom s0 \subset [:: p3; p2]
by have := s0C; rewrite u1C.
by rewrite codom_subC -KH1.
have {cH2}P2 :
(S_[3 ] n.+1 ).*2 <= sd u1 + sp ↓[u (inord 0 )] 3 (a[p1, p2] 0 ) +
sp ↓[u (inord 1 )] 3 (a[p1, p2] 3 ).fec (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
sp (n:=n.+1 ) ↓[u (inord 0 )] 3 ( a[p1, p2] 0 ) +
sp (n:=n.+1 ) ↓[u (inord 1 )] 3 ( a[p1, p2] 3 )
apply : leq_trans (IH _ _ _ _ _ _ cH2) _ => //.
by rewrite eq_sym.
repeat apply : leq_add => //; rewrite leq_eqVlt;
apply /orP; left ; apply /eqP.fec sp (n:=n.+1 ) (u1 ord0) 3 ( a[p1, p2] 0 ) =
sp (n:=n.+1 ) ↓[u (inord 0 )] 3 ( a[p1, p2] 0 )
by apply : eq_bigr => i _; rewrite !ffunE inord_eq0.
by apply : eq_bigr => i _; rewrite !ffunE.
have {}P2 := leq_trans P2
(leq_add (leq_add (leqnn _) (leq_sum_beta _ _)) (leqnn _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 P2 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 )
(↓[u (inord 0 )] k != a[p1, p2] 0 ) *
(α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord 1 )] 3 ( a[p1, p2] 3 )
843 f21
rewrite -/x2P1 (inord_eq0) // -[in inord 1 ]aE1 !(apegS, apeg0) in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 P2 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord a)] 3 p2
843 f21
have cH3 (k : 'I_b.+1 ) :
0 < k < b -> codom (u2 k) \subset [:: p2; a[p3, p1] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1025 9c1
0 < k < b ->
codom (u2 k) \subset [:: p2; a[p3, p1] k]
rewrite [X in k < X]bE => /andP[k_gt0 kLb].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1025 9c1 852 kLb : k < l
codom (u2 k) \subset [:: p2; a[p3, p1] k]
102b
rewrite ffunE addn1; apply : codom_liftr.1032 codom (u (inord k.+1 )) \subset [:: p2; a[p3, p1] k]
102b
have := @cH (inord k.+1 ).1032 (0 < inord k.+1 < l.+1 ->
codom (u (inord k.+1 )) \subset
[:: p2; a[p1, p3] (inord k.+1 )]) ->
codom (u (inord k.+1 )) \subset [:: p2; a[p3, p1] k]
102b
rewrite inordK ?apegS //=; first by apply .
by rewrite ltnS (leq_trans kLb).
have {cH3}P3 :
(S_[b] n.+1 ).*2 <= sd u2 + sp ↓[u (inord 1 )] b p3 +
sp ↓[u ord_max] b (a[p3, p1] b).102d (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 + sp (n:=n.+1 ) ↓[u (inord 1 )] b p3 +
sp (n:=n.+1 ) ↓[u ord_max] b ( a[p3, p1] b)
apply : leq_trans (IH _ _ _ _ _ _ cH3) _ => //; try by rewrite eq_sym.102d sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) (u2 ord0) b ( a[p3, p1] 0 ) +
sp (n:=n.+1 ) (u2 ord_max) b ( a[p3, p1] b) <=
sd (n:=n.+1 ) u2 + sp (n:=n.+1 ) ↓[u (inord 1 )] b p3 +
sp (n:=n.+1 ) ↓[u ord_max] b ( a[p3, p1] b)
1048
repeat apply : leq_add => //; rewrite leq_eqVlt;
apply /orP; left ; apply /eqP; apply : eq_bigr => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1025 102e i : ordinal_finType n.+1
(u2 ord0 i != a[p3, p1] 0 ) * β_[n.+1 , b] i =
(↓[u (inord 1 )] i != p3) * β_[n.+1 , b] i
by rewrite !ffunE.
rewrite !ffunE /= addn1 bE; congr ((u _ _ != _) * _).
by apply /val_eqP; rewrite /= inordK.
have {}P3 := leq_trans P3 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1025 P3 : (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) ↓[u (inord 1 )] b p3 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] b) *
(α_[1 ] k).*2
843 f21
rewrite -/x2P1 (_ : a[p3, p1] b = a[p3, p1] l) in P3; last first .1024 a[p3, p1] b = a[p3, p1] l
by rewrite bE.
rewrite -[in inord 1 ]aE1 in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1025 P3 : (S_[b] n.+1 ).*2 <=
x2P1 + sp (n:=n.+1 ) ↓[u (inord a)] b p3 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
843 f21
rewrite !sum_beta_S // KH1 eqxx mul0n addn0 KH2 mul1n.1075 (S_[l.+1 ] n.+2 ).*2 <=
xP1 +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
(\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
α_[l.+1 ] n.+1 )
f21
set xS := \sum_(i < _) _ in P2; rewrite -/xS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 1076 xS := \sum_(i < n.+1 ) (↓[u ord0] i != p1) * (α_[1 ] i).*2 : nat
P2 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 + xS +
sp (n:=n.+1 ) ↓[u (inord a)] 3 p2
a2c f21
set yS := \sum_(i < _) _ in P3; rewrite -/yS.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f 1080 e83 P3 : (S_[b] n.+1 ).*2 <=
x2P1 + sp (n:=n.+1 ) ↓[u (inord a)] b p3 + yS
a33 f21
set x1S := sp _ _ _ in P2; set y1S := sp _ _ _ in P3.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 x1S := sp (n:=n.+1 ) ↓[u (inord a)] 3 p2 : nat
P2 : (S_[3 ] n.+1 ).*2 <= sd (n:=n.+1 ) u1 + xS + x1S
y1S := sp (n:=n.+1 ) ↓[u (inord a)] b p3 : nat
P3 : (S_[b] n.+1 ).*2 <= x2P1 + y1S + yS
a33 f21
have x1Sy1SE : x1S + y1S <= (S_[1 ] n).*2 + α_[maxn 3 b] n.1089 x1S + y1S <= (S_[1 ] n).*2 + α_[maxn 3 b] n
apply : sum_alpha_diffE => //.1089 codom ↓[u (inord a)] \subset [:: p2; p3]
1092
apply : codom_liftr.1089 codom (u (inord a)) \subset [:: p2; p3]
1092
have /cH : 0 < (inord a : 'I_l.+2 ) < l.+1 by rewrite aE1 inordK.1089 codom (u (inord a)) \subset
[:: p2; a[p1, p3] (inord a)] ->
codom (u (inord a)) \subset [:: p2; p3]
1092
by rewrite inordK aE1.
rewrite -/x1P1 in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c 5d1 f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 P2 : (S_[3 ] n.+1 ).*2 <= x1P1 + xS + x1S
a33 f21
rewrite -addnn {1 }dsum_alphaL_S -bE.10a8 S_[b.+1 ] n.+1 + α_[b.+1 ] n.+1 + S_[b.+1 ] n.+2 <=
xP1 + xS + (yS + α_[b.+1 ] n.+1 )
f21
suff :
S_[b.+1 ] n.+1 + S_[b.+1 ] n.+2 + 2 * S_[1 ] n + α_[maxn 3 b] n <=
2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2 .10a8 S_[b.+1 ] n.+1 + S_[b.+1 ] n.+2 + 2 * S_[1 ] n +
α_[maxn 3 b] n <= 2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2 ->
S_[b.+1 ] n.+1 + α_[b.+1 ] n.+1 + S_[b.+1 ] n.+2 <=
xP1 + xS + (yS + α_[b.+1 ] n.+1 )
by lia .
move : b_gt1; rewrite leq_eqVlt => /orP[/eqP bE2|b_gt2].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 bE2 : 2 = b
10b4
rewrite -bE2 (maxn_idPl _) //.10bb S_[3 ] n.+1 + S_[3 ] n.+2 + 2 * S_[1 ] n + α_[3 ] n <=
2 * S_[3 ] n.+1 + 2 * S_[2 ] n.+1 + 2
10bd
rewrite [S_[3 ] n.+2 ]dsum_alphaL_S.10bb S_[3 ] n.+1 + (S_[3 ] n.+1 + α_[3 ] n.+1 ) + 2 * S_[1 ] n +
α_[3 ] n <= 2 * S_[3 ] n.+1 + 2 * S_[2 ] n.+1 + 2
10bd
have G1 := alphaL_3E n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10bc G1 : α_[3 ] n = α_[1 ] n.+1
10c8 10bd
have G2 := alphaL_3E n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10bc 10cd G2 : α_[3 ] n.+1 = α_[1 ] n.+2
10c8 10bd
have F := leq_dsum_alpha_2l_1 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10bc 10cd 10d2 F : S_[1 ] n.+1 + S_[1 ] n.+2 <= (S_[2 ] n.+1 ).*2 .+1
10c8 10bd
rewrite 3 !dsum_alphaL_S in F *.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10bc 10cd 10d2 F : S_[1 ] n + α_[1 ] n +
(S_[1 ] n + α_[1 ] n + α_[1 ] n.+1 ) <=
(S_[2 ] n.+1 ).*2 .+1
10c8 10bd
by have F1 := alphaL_4_5 n; lia .
rewrite (maxn_idPr _) //.10bf S_[b.+1 ] n.+1 + S_[b.+1 ] n.+2 + 2 * S_[1 ] n + α_[b] n <=
2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2
f21
have A0 := dsum_alpha3_S n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 A0 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1
10e3 f21
have A1 := dsum_alphaL_S 1 n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 10e8 A1 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
10e3 f21
have A2 := dsum_alphaL_S 1 n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 10e8 10ed A2 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
10e3 f21
have A3 := dsum_alphaL_S b n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 10e8 10ed 10f2 A3 : S_[b] n.+1 = S_[b] n + α_[b] n
10e3 f21
have A4 := @dsum_alphaL_alpha b n.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 10e8 10ed 10f2 10f7 A4 : 1 < b -> S_[b.+1 ] n.+1 <= S_[b] n + (α_[1 ] n).*2
10e3 f21
have A5 := @dsum_alphaL_alpha b n.+1 .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f2c f41 f46 f4e f4f f50 f78 f7d 836 837 83e fe4 107f e83 108a 108c 108d 1095 10a9 10c0 10e8 10ed 10f2 10f7 10fc A5 : 1 < b ->
S_[b.+1 ] n.+2 <= S_[b] n.+1 + (α_[1 ] n.+1 ).*2
10e3 f21
by lia .
have /cH : 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite inordK.f23 codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
f0f
move => /subsetP /(_ (u (inord 1 ) ldisk) (codom_f _ _)).f23 u (inord 1 ) ldisk \in [:: p2; a[p1, p3] (inord 1 )] ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
f0f
rewrite !inE inordK // apegS apeg0.f23 (u (inord 1 ) ldisk == p2) || (u (inord 1 ) ldisk == p3) ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
f0f
have := aH; rewrite (_ : inord a = inord 1 ); last first .
by apply /val_eqP; rewrite /= !inordK // aE1.
rewrite aE1 apegS => /negPf->; rewrite orbF => /eqP u1LE.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 u1LE : u (inord 1 ) ldisk = p2
573 f0f
case : (@sgdistE _ p3 (u ord0) (u (inord 1 ))) => //.
- 1121
by rewrite KH1.
- 112c
by rewrite KH1 u1LE.
- 1131
by rewrite u1LE eq_sym.
- 1136
by rewrite KH1.
by rewrite u1LE.
set s0 := sgdist1 _ _ _; set t0 := sgdist2 _ _ _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f s0 := sgdist1 (n:=n.+1 ) p3 (u ord0) (u (inord 1 )) : configuration 4 n.+1
t0 := sgdist2 (n:=n.+1 ) p3 (u ord0) (u (inord 1 )) : configuration 4 n.+1
codom s0 \subset [:: p3; u (inord 1 ) ldisk] ->
codom t0 \subset [:: u ord0 ldisk; p3] ->
`d[u ord0, u (inord 1 )]_smove =
D[[:: ↓[u ord0]; s0; t0; ↓[u (inord 1 )]]].+2 ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
f0f
move => s0C t0C du0u1; rewrite /= !addnA addn0 in du0u1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f du0u1 : `d[u ord0, u (inord 1 )]_smove =
(`d[↓[u ord0], s0]_smove + `d[s0, t0]_smove +
`d[t0, ↓[u (inord 1 )]]_smove).+2
573 f0f
pose u1 :=
[ffun i =>
if (i : 'I_5) == 0 :> nat then ↓[u ord0] else
if i == 1 :> nat then s0 else
if i == 2 :> nat then t0 else
if i == 3 :> nat then ↓[u (inord 1 )] else ↓[u (inord 2 )]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c u1 := [ffun i => if (i : 'I_5) == 0 :> nat
then ↓[u ord0]
else
if i == 1 :> nat
then s0
else
if i == 2 :> nat
then t0
else
if i == 3 :> nat
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]] : {ffun forall x : ordinal_finType 5 ,
(fun => configuration 4 n.+1 ) x}
573 f0f
have P1 : 2 + sd u1 <= sd u.1150 2 + sd (n:=n.+1 ) u1 <= sd (n:=n.+2 ) u
rewrite /sd 2 ![in X in X <= _]big_ord_recr
[X in _ <= X]big_ord_recr /= !addnA.1150 2 +
\sum_(i < 2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[u1 (inord 2 ), u1 (inord 3 )]_smove +
`d[u1 (inord 3 ), u1 (inord 4 )]_smove <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord l), u (inord l.+1 )]_smove
1156
apply : leq_add; last first .1150 `d[u1 (inord 3 ), u1 (inord 4 )]_smove <=
`d[u (inord l), u (inord l.+1 )]_smove
apply : leq_trans (gdist_cunlift _); last by apply : shanoi_connect.1150 `d[u1 (inord 3 ), u1 (inord 4 )]_smove <=
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
1162
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1150 `d[u1 (inord 3 ), u1 (inord 4 )]_smove =
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
1162
rewrite !ffunE ![in LHS]inordK //=.1150 `d[↓[u (inord 1 )], ↓[u (inord 2 )]]_smove =
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
1162
by congr (`d[↓[u _],↓[u _]]_smove);
apply /val_eqP; rewrite /= !inordK //= -bE bE1.
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1150 2 +
\sum_(i < 2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[u1 (inord 2 ), u1 (inord 3 )]_smove =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
1156
rewrite !big_ord_recr big_ord0 /= !ffunE !inordK //= add0n.1150 2 + (`d[↓[u ord0], s0]_smove + `d[s0, t0]_smove) +
`d[t0, ↓[u (inord 1 )]]_smove =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
1156
rewrite -addnA add2n -du0u1.1150 `d[u ord0, u (inord 1 )]_smove =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
1156
move : bE; rewrite -bE1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f24 111f 1145 1146 f4e f4f 114c 1151
1 = l ->
`d[u ord0, u (inord 1 )]_smove =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
1156
case : (l) u => // [] [] // uu _; rewrite big_ord_recl big_ord0 addn0 /=.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f24 111f 1145 1146 f4e f4f 114c 1151 uu : {ffun 'I_3 -> configuration 4 n.+2 }
`d[uu ord0, uu (inord 1 )]_smove =
`d[uu (inord 0 ), uu (inord 1 )]_smove
1156
by congr (`d[uu _, uu _]_smove); apply /val_eqP; rewrite /= !inordK.
have cH1 (k : 'I_5) :
0 < k < 4 -> codom (u1 k) \subset [:: p3; a[p1, p2] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 1159 k : 'I_5
0 < k < 4 ->
codom (u1 k) \subset [:: p3; a[p1, p2] k]
case : k => [] [|[|[|[|]]]] //= iH _; rewrite !ffunE !(apegS, apeg0).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 1159 iH : 1 < 5
codom
(if Ordinal (n:=5 ) (m:=1 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=1 ) iH == 1
then s0
else
if Ordinal (n:=5 ) (m:=1 ) iH == 2
then t0
else
if Ordinal (n:=5 ) (m:=1 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p2]
- 1199
by have := s0C; rewrite u1LE.11a0 codom
(if Ordinal (n:=5 ) (m:=2 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=2 ) iH == 1
then s0
else
if Ordinal (n:=5 ) (m:=2 ) iH == 2
then t0
else
if Ordinal (n:=5 ) (m:=2 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p1]
- 11a9
by rewrite codom_subC -KH1.11a4 codom
(if Ordinal (n:=5 ) (m:=3 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=3 ) iH == 1
then s0
else
if Ordinal (n:=5 ) (m:=3 ) iH == 2
then t0
else
if Ordinal (n:=5 ) (m:=3 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p2]
1194
rewrite codom_subC.11a4 codom ↓[u (inord 1 )] \subset [:: p2; p3]
1194
apply /subsetP=> i /codomP[x ->]; rewrite !ffunE.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 1159 11a5 31e x : ordinal_finType n.+1
u (inord 1 ) (trshift 1 x) \in [:: p2; p3]
1194
have /cH: 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite inordK //.11b9 codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
u (inord 1 ) (trshift 1 x) \in [:: p2; p3]
1194
by rewrite inordK // =>
/subsetP /(_ (u (inord 1 ) (trshift 1 x)) (codom_f _ _)).
have {cH1}P2 :
(S_[4 ] n.+1 ).*2 <= sd u1 + sp (u1 ord0) 4 p1 + sp (u1 ord_max) 4 p1.1196 (S_[4 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 + sp (n:=n.+1 ) (u1 ord0) 4 p1 +
sp (n:=n.+1 ) (u1 ord_max) 4 p1
by apply : IH cH1 => //; rewrite eq_sym.
set xP := sd _; rewrite -/xP in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 11ca xP := sd (n:=n.+2 ) u : nat
P1 : 2 + sd (n:=n.+1 ) u1 <= xP
(S_[l.+1 ] n.+2 ).*2 <=
xP + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
f0f
have {}P2 :=
leq_trans P2 (leq_add (leq_add (leqnn _ ) (leq_sum_beta _ _))
(leq_sum_beta _ _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 11d2 11d3 P2 : (S_[4 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 ) (u1 ord0 k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(u1 ord_max k != p1) * (α_[1 ] k).*2
11d4 f0f
set x1P := sd _ in P1; rewrite -/x1P in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 11d2 x1P := sd (n:=n.+1 ) u1 : nat
P1 : 2 + x1P <= xP
P2 : (S_[4 ] n.+1 ).*2 <=
x1P +
\sum_(k < n.+1 ) (u1 ord0 k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(u1 ord_max k != p1) * (α_[1 ] k).*2
11d4 f0f
rewrite !ffunE /= (_ : inord 2 = ord_max) in P2; last first .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 11d2 11de 11df
inord 2 = ord_max
by apply : val_inj; rewrite /= inordK // -bE bE1.
rewrite {2 }(_ : p1 = a[p3, p1] l) in P2; last first .
by rewrite -bE -bE1.
set x1S := \sum_(_ < _) _ in P2; set x2S := \sum_(_ < _) _ in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f0e f1c f24 111f 1145 1146 f4e f4f 114c 1151 11d2 11de 11df x1S := \sum_(H < n.+1 )
(↓[u ord0] H != p1) * (α_[1 ] H).*2 : nat
x2S := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) *
(α_[1 ] H).*2 : nat
P2 : (S_[4 ] n.+1 ).*2 <= x1P + x1S + x2S
11d4 f0f
rewrite !sum_beta_S //= KH1 KH2 !eqxx !addn0 mul1n.11fb (S_[l.+1 ] n.+2 ).*2 <=
xP +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
(\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
α_[l.+1 ] n.+1 )
f0f
rewrite -/x1S -/x2S -!addnA.11fb (S_[l.+1 ] n.+2 ).*2 <=
xP + (x1S + (x2S + α_[l.+1 ] n.+1 ))
f0f
apply : leq_trans (leq_add P1 (leqnn _)).11fb (S_[l.+1 ] n.+2 ).*2 <=
2 + x1P + (x1S + (x2S + α_[l.+1 ] n.+1 ))
f0f
rewrite -!addnA addnC !addnA -addnA.11fb (S_[l.+1 ] n.+2 ).*2 <=
x1P + x1S + x2S + (α_[l.+1 ] n.+1 + 2 )
f0f
apply : leq_trans (leq_add P2 (leqnn _)).11fb (S_[l.+1 ] n.+2 ).*2 <=
(S_[4 ] n.+1 ).*2 + (α_[l.+1 ] n.+1 + 2 )
f0f
rewrite -bE -bE1 -addnn {2 }dsum_alphaL_S addnA.11fb S_[2 ] n.+2 + S_[2 ] n.+1 + α_[2 ] n.+1 <=
(S_[4 ] n.+1 ).*2 + (α_[2 ] n.+1 + 2 )
f0f
rewrite [_ + 2 ]addnC !addnA leq_add2r addnC.11fb S_[2 ] n.+1 + S_[2 ] n.+2 <= (S_[4 ] n.+1 ).*2 + 2
f0f
by apply : leq_dsum_alpha_2l_l 2 n.+1 .
have aEl : a = l.+1 .
apply /eqP; rewrite eqn_leq aLld1 /=.
case /orP: oH; first by case : (a) aD1 a_gt0 => [|[|]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be f09 f12
l.-1 < a -> l < a
1222
case /orP: o1H; first by case : (a) aD1 a_gt0 => [|[|]].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be f12
b != 1 -> l.-1 < a -> l < a
1222
rewrite /b prednK // => H1 lLa; move : lLa H1.1232 l <= a -> l.+1 - a != 1 -> l < a
1222
by rewrite leq_eqVlt => /orP[] // /eqP ->; rewrite subSn // subnn eqxx.
have bE0 : b = 0 by rewrite /b aEl subnn.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 bE0 : b = 0
573
pose si i : configuration 4 n.+1 :=
sgdist1 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb
573
pose ti i : configuration 4 n.+1 :=
sgdist2 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0
573
have sitiH i : i < l ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 14a
i < l ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk],
codom (ti i) \subset [:: u (inord i) ldisk; p2]
& `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i;
↓[u (inord i.+1 )]]].+2 ]
move => iLl.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 14a iLl : i < l
5ff 124d
have iLl1 : i < l.+1 by rewrite (leq_trans iLl).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 14a 1255 iLl1 : i < l.+1
5ff 124d
apply : sgdistE => //.
- 125c
by rewrite aMin1 // aEl.
- 1265
rewrite !aMin1 ?aEl //.
by rewrite apegS apeg_eqC.
- 126d
by rewrite aMin1 ?aEl // eq_sym.
- 1272
by rewrite aMin1 // aEl.
by rewrite aMin1 // aEl.
pose u1 :=
[ffun i =>
if ((i : 'I_(3 * l).+2 ) == (3 * l).+1 :>nat) then ↓[u ai]
else if (i %% 3 ) == 0 then ↓[u (inord (i %/ 3 ))]
else if (i %% 3 ) == 1 then si (i %/ 3 )
else ti (i %/ 3 )].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 u1 := [ffun i => if
(i : 'I_(3 * l).+2 ) ==
(3 * l).+1 :> nat
then ↓[u ai]
else
if i %% 3 == 0
then ↓[u (inord (i %/ 3 ))]
else
if i %% 3 == 1
then si (i %/ 3 )
else ti (i %/ 3 )] : {ffun forall x : ordinal_finType (3 * l).+2 ,
(fun => configuration 4 n.+1 ) x}
573
have u10E : u1 ord0 = ↓[u ord0].
rewrite ffunE /=.127f ↓[u (inord (0 %/ 3 ))] = ↓[u ord0]
1284
by congr (↓[u _]); apply /val_eqP; rewrite /= inordK.
have u1mE : u1 ord_max = ↓[u ord_max].1286 u1 ord_max = ↓[u ord_max]
rewrite ffunE eqxx.1286 ↓[u ai] = ↓[u ord_max]
1292
by congr (↓[u _]); apply /val_eqP/eqP; rewrite /= inordK.
have P1 : l.*2 + sd u1 <= sd u.1294 l.*2 + sd (n:=n.+1 ) u1 <= sd (n:=n.+2 ) u
rewrite /sd !big_ord_recr /=.1294 l.*2 +
(\sum_(i < 3 * l)
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[u1 (inord (3 * l)), u1 (inord (3 * l).+1 )]_smove) <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
`d[u (inord l), u (inord l.+1 )]_smove
12a1
rewrite addnA; apply : leq_add; last first .1294 `d[u1 (inord (3 * l)), u1 (inord (3 * l).+1 )]_smove <=
`d[u (inord l), u (inord l.+1 )]_smove
apply : leq_trans (gdist_cunlift _); last by apply : shanoi_connect.1294 `d[u1 (inord (3 * l)), u1 (inord (3 * l).+1 )]_smove <=
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
12ad
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1294 `d[u1 (inord (3 * l)), u1 (inord (3 * l).+1 )]_smove =
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
12ad
rewrite !ffunE !inordK ?eqxx //.1294 `d[if 3 * l == (3 * l).+1
then ↓[u ai]
else
if (3 * l) %% 3 == 0
then ↓[u (inord ((3 * l) %/ 3 ))]
else
if (3 * l) %% 3 == 1
then si ((3 * l) %/ 3 )
else ti ((3 * l) %/ 3 ), ↓[u ai]]_smove =
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
12ad
rewrite eqn_leq [_ <= _ * _]leqNgt leqnn andbF mod3E /= div3E.1294 `d[↓[u (inord l)], ↓[u ai]]_smove =
`d[↓[u (inord l)], ↓[u (inord l.+1 )]]_(move (q:=4 )
(srel (n:=4 )))
12ad
congr (`d[↓[u _], ↓[u _]]_smove); apply /val_eqP; rewrite /= ?mulKn //.
by rewrite inordK // aiE aEl.
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1294 l.*2 +
\sum_(i < 3 * l)
`d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
12a1
have -> := @sum3E _ (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_smove).1294 l.*2 +
\sum_(i < l)
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
12a1
have -> : l.*2 = \sum_(i < l) 2 .1294 l.*2 = \sum_(i < l) 2
by rewrite sum_nat_const /= cardT size_enum_ord muln2.1294 \sum_(i < l) 2 +
\sum_(i < l)
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite -big_split /=; apply : eq_bigr => i _.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 fa0
739 12a1
rewrite ffunE !inordK //; last first .
by rewrite ltnS ltnW // ltnS leq_mul2l /= ltnW.12dd 2 +
(`d[if 3 * i == (3 * l).+1
then ↓[u ai]
else
if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 ), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite eqn_leq [_ <= _ * _]leqNgt ltnS leq_mul2l //=.12dd 2 +
(`d[if (3 * i <= (3 * l).+1 ) && ~~ (i <= l)
then ↓[u ai]
else
if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 ), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite (ltnW (ltn_ord _)) andbF mod3E /= div3E.
rewrite ffunE !inordK //; last first .12dd (3 * i).+1 < (3 * l).+2
by rewrite !ltnS leq_mul2l /= ltnW.12dd 2 +
(`d[↓[u (inord i)], if (3 * i).+1 == (3 * l).+1
then ↓[u ai]
else
if (3 * i).+1 %% 3 == 0
then
↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )]_smove +
`d[if (3 * i).+1 == (3 * l).+1
then ↓[u ai]
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite eqn_leq [_.+1 <= _]leqNgt !ltnS leq_mul2l /= [_ <= i]leqNgt.12dd 2 +
(`d[↓[u (inord i)], if
~~ (3 * l < 3 * i) && ~~ (i < l)
then ↓[u ai]
else
if (3 * i).+1 %% 3 == 0
then
↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )]_smove +
`d[if ~~ (3 * l < 3 * i) && ~~ (i < l)
then ↓[u ai]
else
if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite ltn_ord andbF mod3E /= div3E -[(_ * _).+3 ](mulnDr 3 1 i) add1n.12dd 2 +
(`d[↓[u (inord i)], si i]_smove +
`d[si i, u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i.+1 ))]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite ffunE !inordK //; last first .12dd (3 * i).+2 < (3 * l).+2
by rewrite !ltnS ltn_mul2l /=.12dd 2 +
(`d[↓[u (inord i)], si i]_smove +
`d[si i, if (3 * i).+2 == (3 * l).+1
then ↓[u ai]
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )]_smove +
`d[if (3 * i).+2 == (3 * l).+1
then ↓[u ai]
else
if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 ), u1 (inord (3 * i.+1 ))]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
12a1
rewrite !mod3E /= !div3E ifN; last first .12dd (3 * i).+2 != (3 * l).+1
case : eqP => // eH.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 fa0 eH : (3 * i).+2 = (3 * l).+1
~~ true
1312
have : (3 * i).+2 %% 3 = (3 * l).+1 %% 3 by rewrite eH.1318 (3 * i).+2 = (3 * l).+1 %[mod 3 ] -> ~~ true
1312
by rewrite !mod3E.
rewrite ffunE inordK; last first .12dd 3 * i.+1 < (3 * l).+2
by rewrite ltnS ltnW // ltnS leq_mul2l /=.
rewrite mod3E /= div3E ifN.
case : (sitiH i) => //= _ _ ->.12dd 2 +
(`d[↓[u (inord i)], si i]_smove + `d[si i, ti i]_smove +
`d[ti i, ↓[u (inord i.+1 )]]_smove) =
(`d[↓[u (inord i)], si i]_smove +
(`d[si i, ti i]_smove +
(`d[ti i, ↓[u (inord i.+1 )]]_smove + 0 ))).+2
132f
by rewrite /= !addnA addn0.
case : eqP => // eH.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 fa0 eH : 3 * i.+1 = (3 * l).+1
131a 12a1
have : (3 * i.+1 ) %% 3 = (3 * l).+1 %% 3 by rewrite eH.133c 3 * i.+1 = (3 * l).+1 %[mod 3 ] -> ~~ true
12a1
by rewrite !mod3E.
have cH1 (k : 'I_(3 * l).+2 ) :
0 < k < (3 * l).+1 -> codom (u1 k) \subset [:: p2; a[p1, p3] k].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 k : 'I_(3 * l).+2
0 < k < (3 * l).+1 ->
codom (u1 k) \subset [:: p2; a[p1, p3] k]
rewrite !ffunE.1348 0 < k < (3 * l).+1 ->
codom
(if k == (3 * l).+1
then ↓[u ai]
else
if k %% 3 == 0
then ↓[u (inord (k %/ 3 ))]
else
if k %% 3 == 1 then si (k %/ 3 ) else ti (k %/ 3 )) \subset
[:: p2; a[p1, p3] k]
134b
case : eqP => [->|/eqP kD3l1]; first by rewrite ltnn andbF.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 kD3l1 : k != (3 * l).+1
0 < k < (3 * l).+1 ->
codom
(if k %% 3 == 0
then ↓[u (inord (k %/ 3 ))]
else
if k %% 3 == 1 then si (k %/ 3 ) else ti (k %/ 3 )) \subset
[:: p2; a[p1, p3] k]
134b
case : eqP => [km3E0|/eqP km3D0].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 1357 km3E0 : k %% 3 = 0
0 < k < (3 * l).+1 ->
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] k]
rewrite {1 2 4 }(divn_eq k 3 ) km3E0 addn0.135c 0 < k %/ 3 * 3 < (3 * l).+1 ->
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 )]
135f
rewrite ltnS mulnC muln_gt0 leq_mul2l /= => /andP[k3_gt0 k3Ll].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 1357 135d k3_gt0 : 0 < k %/ 3
k3Ll : k %/ 3 <= l
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] (3 * (k %/ 3 ))]
135f
rewrite apegMr //.136b codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] (k %/ 3 )]
135f
have := @H (inord (k %/ 3 )); rewrite ffunE inordK //; last first .
by apply : leq_trans k3Ll _.
by apply ; rewrite k3_gt0.
case : eqP => [km3E1|/eqP km3D1].5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 1357 1362 km3E1 : k %% 3 = 1
0 < k < (3 * l).+1 ->
codom (si (k %/ 3 )) \subset [:: p2; a[p1, p3] k]
rewrite {1 2 4 }(divn_eq k 3 ) km3E1 addn1 !ltnS /= mulnC ltn_mul2l /= => H1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 1357 1362 1383 H1 : k %/ 3 < l
codom (si (k %/ 3 )) \subset
[:: p2; a[p1, p3] (3 * (k %/ 3 )).+1 ]
1385
case : (sitiH (k %/ 3 )) => //.138d codom (si (k %/ 3 )) \subset
[:: p2; u (inord (k %/ 3 ).+1 ) ldisk] ->
codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (si (k %/ 3 )) \subset
[:: p2; a[p1, p3] (3 * (k %/ 3 )).+1 ]
1385
by rewrite apegS apegMr // aMin1 ?apegS // aEl ltnS.
have km3E2 : k %% 3 = 2 .
by case : (_ %% _) (ltn_mod k 3 ) km3D0 km3D1 => // [] [|[|]].
rewrite {1 2 4 }(divn_eq k 3 ) km3E2 addn2 /= ltnS => H1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 1349 1357 1362 1388 139d H1 : (k %/ 3 * 3 ).+1 < 3 * l
codom (ti (k %/ 3 )) \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 ).+2 ]
134b
have {}H1 : k %/ 3 < l.
by rewrite -[_ < _](ltn_mul2r 3 ) [l * 3 ]mulnC (leq_ltn_trans _ H1).
rewrite codom_subC.13ad codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 * 3 ).+2 ; p2]
134b
case : (sitiH (k %/ 3 )) => // _.13ad codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 * 3 ).+2 ; p2]
134b
rewrite !apegS [_ * 3 ]mulnC apegMr //.13ad codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 ); p2]
134b
by rewrite aMin1 // (leq_trans H1) // aEl.
have {cH1}P2 :
(S_[(3 * l).+1 ] n.+1 ).*2 <= sd u1 + sp (u1 ord0) (3 * l).+1 p1 +
sp (u1 ord_max) (3 * l).+1
(a[p1, p3] (3 * l).+1 ).134d (S_[(3 * l).+1 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 + sp (n:=n.+1 ) (u1 ord0) (3 * l).+1 p1 +
sp (n:=n.+1 ) (u1 ord_max) (3 * l).+1
( a[p1, p3] (3 * l).+1 )
by apply : IH cH1.
have {}P2 := leq_trans P2 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leq_sum_beta _ _)).5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 12a4 P2 : (S_[(3 * l).+1 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 ) (u1 ord0 k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(u1 ord_max k != a[p1, p3] (3 * l).+1 ) *
(α_[1 ] k).*2
573
set xP := sd _; rewrite -/xP in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 13cf 11d2 P1 : l.*2 + sd (n:=n.+1 ) u1 <= xP
11d4
set x1P := sd _ in P1.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 13cf 11d2 11de P1 : l.*2 + x1P <= xP
11d4
rewrite -/x1P (_ : a[p1, p3] (3 * l).+1 = a[p3, p1] l) in P2; last first .5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 11d2 11de 13d9
a[p1, p3] (3 * l).+1 = a[p3, p1] l
by rewrite apegS apegMr.
rewrite !sum_beta_S // KH1 KH2 !eqxx addn0 mul1n.
rewrite !ffunE /= eqxx inord_eq0 // (_ : ai = ord_max) in P2; last first .
by apply : val_inj; rewrite /= inordK.
set x1S := \sum_(_ < _) _ in P2; set x2S := \sum_(_ < _) _ in P2.5 129 556 557 11 558 15 16 17 12 13 14 559 55a 561 568 56f 570 571 572 579 581 228 589 58a 593 59b 5a0 5a5 5aa 5af 5b4 5b9 5be b1e f09 f12 1225 123f 5eb 5f0 1250 1280 683 1295 11d2 11de 13d9 11fc 11fd P2 : (S_[(3 * l).+1 ] n.+1 ).*2 <= x1P + x1S + x2S
1202
rewrite -/x1S -/x2S .13f7 (S_[l.+1 ] n.+2 ).*2 <= xP + x1S + (x2S + α_[l.+1 ] n.+1 )
rewrite -addnn {1 }dsum_alphaL_S addnAC !addnA leq_add2r.13f7 S_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <= xP + x1S + x2S
rewrite -[X in _ <= X]addnA.13f7 S_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <= xP + (x1S + x2S)
apply : leq_trans (leq_add P1 (leqnn _)).13f7 S_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <=
l.*2 + x1P + (x1S + x2S)
rewrite -[X in _ <= X]addnA [x1P + _]addnA.13f7 S_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <=
l.*2 + (x1P + x1S + x2S)
apply : leq_trans (leq_add (leqnn _) P2).13f7 S_[l.+1 ] n.+1 + S_[l.+1 ] n.+2 <=
l.*2 + (S_[(3 * l).+1 ] n.+1 ).*2
apply : leq_trans (leq_dsum_alpha_2l_l _ _) _.13f7 (S_[(l.+1 ).*2 ] n.+1 ).*2 + l.+1 <=
l.*2 + (S_[(3 * l).+1 ] n.+1 ).*2
rewrite addnC; apply : leq_add.
by rewrite -addnn -addn1 leq_add.
rewrite leq_double.13f7 S_[(l.+1 ).*2 ] n.+1 <= S_[(3 * l).+1 ] n.+1
apply : (increasingE (increasing_dsum_alphaL_l _)).13f7 (l.+1 ).*2 <= (3 * l).+1
by rewrite doubleS ltnS -mul2n ltn_mul2r l_ggt0.
Qed .
End Case1 .
(* This corresponds to the subcase of 4.2 when E is empty *)
Section Case2 .
Variable n : nat.
Hypothesis IH :
forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l -> codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <= sd u + sp (u ord0) l (a[p1, p3] 0 ) +
sp (u ord_max) l (a[p1, p3] l).
Lemma case2 l (u : {ffun 'I_l.+2 -> configuration 4 n.+2 })
(p1 p2 p3 : peg 4 ) :
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(u ord0 ord_max = p1) ->
(u ord_max ord_max = a[p3, p1] l) ->
(forall k , u k ldisk = a[p1, p3] k) ->
(S_[l.+1 ] n.+2 ).*2 <= sd u + sp (u ord0) l.+1 p1
+ sp (u ord_max) l.+1 (a[p3, p1] l).5 129 556 557 558 11
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
(forall k : ordinal_finType l.+2 ,
u k ldisk = a[p1, p3] k) ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
Proof .1428
move => p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0.5 129 556 557 558 11 15 16 17 12 13 14
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
(forall k : ordinal_finType l.+2 ,
u k ldisk = a[p1, p3] k) ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
move => /= cH KH1 KH2 ukLE.5 129 556 557 558 11 15 16 17 12 13 14 559 570 KH2 : u ord_max ord_max = a[p3, p1] l
ukLE : forall k : 'I_l.+2 , u k ldisk = a[p1, p3] k
573
pose u':= ([ffun i => ↓[u i]] : {ffun 'I_l.+2 -> configuration 4 n.+1 })
: {ffun 'I_l.+2 -> configuration 4 n.+1 }.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a
573
have H: forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u' k) \subset [:: p2; a[p1, p3] k].
by move => k kH; rewrite ffunE; apply /codom_liftr/cH.
have apegpaD2 a : a[p1, p3] a != p2.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 228
562
by rewrite /apeg; case : odd; rewrite // eq_sym.
have apegpaD0 a : a[p1, p3] a != p0.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 228
569
by rewrite /apeg; case : odd; rewrite // eq_sym.
pose si i : configuration 4 n.+1 :=
sgdist1 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb
573
pose ti i : configuration 4 n.+1 :=
sgdist2 p2 (u (inord i)) (u (inord i.+1 )).5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0
573
have sitiH i : i < l.+1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 14a
i < l.+1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk],
codom (ti i) \subset [:: u (inord i) ldisk; p2]
& `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i;
↓[u (inord i.+1 )]]].+2 ]
move => iLl.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 14a iLl : i < l.+1
5ff 1468
have i1Ll1 : i <= l by [].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 14a 1470 i1Ll1 : i <= l
5ff 1468
apply : sgdistE; rewrite ?ukLE //.1474 a[p1, p3] (inord i) != a[p1, p3] (inord i.+1 )
rewrite !inordK //=; last by rewrite ltnS ltnW // ltnS.
by rewrite apegS apeg_eqC.
by rewrite eq_sym.
pose u1 :=
[ffun i =>
if ((i : 'I_(3 * l.+1 ).+1 ) %% 3 ) == 0 then ↓[u (inord (i %/ 3 ))]
else if (i %% 3 ) == 1 then si (i %/ 3 )
else ti (i %/ 3 )].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b u1 := [ffun i => if (i : 'I_(3 * l.+1 ).+1 ) %% 3 == 0
then ↓[u (inord (i %/ 3 ))]
else
if i %% 3 == 1
then si (i %/ 3 )
else ti (i %/ 3 )] : {ffun forall x : ordinal_finType (3 * l.+1 ).+1 ,
(fun => configuration 4 n.+1 ) x}
573
have u10E : u1 ord0 = ↓[u ord0].
rewrite ffunE /=.
by congr (↓[u _]); apply /val_eqP; rewrite /= inordK.
have u1ME : u1 ord_max = ↓[u ord_max].
rewrite ffunE /= mod3E /= div3E.1490 ↓[u (inord l.+1 )] = ↓[u ord_max]
149a
by congr (↓[u _]); apply /val_eqP; rewrite /= inordK.
have P1 : l.+1 .*2 + sd u1 = sd u.149c (l.+1 ).*2 + sd (n:=n.+1 ) u1 = sd (n:=n.+2 ) u
rewrite /sd.149c (l.+1 ).*2 +
\sum_(i < 3 * l.+1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove
14a9
have -> := @sum3E _ (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_smove).149c (l.+1 ).*2 +
\sum_(i < l.+1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove
14a9
have -> : l.+1 .*2 = \sum_(i < l.+1 ) 2 .149c (l.+1 ).*2 = \sum_(i < l.+1 ) 2
by rewrite sum_nat_const /= cardT size_enum_ord muln2.149c \sum_(i < l.+1 ) 2 +
\sum_(i < l.+1 )
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove
14a9
rewrite -big_split /=; apply : eq_bigr => i _.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d i : 'I_l.+1
739 14a9
rewrite ffunE !inordK //; last first .14c3 3 * i < (3 * l.+1 ).+1
by rewrite ltnS leq_mul2l ltnW.14c3 2 +
(`d[if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then si ((3 * i) %/ 3 )
else ti ((3 * i) %/ 3 ), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
14a9
rewrite mod3E /= div3E.
rewrite ffunE inordK; last first .14c3 (3 * i).+1 < (3 * l.+1 ).+1
by rewrite ltnS ltn_mul2l /=.14c3 2 +
(`d[↓[u (inord i)], if (3 * i).+1 %% 3 == 0
then
↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 )]_smove +
`d[if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then si ((3 * i).+1 %/ 3 )
else ti ((3 * i).+1 %/ 3 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
14a9
rewrite mod3E /= div3E.
rewrite ffunE inordK; last first .14c3 (3 * i).+2 < (3 * l.+1 ).+1
by rewrite -[_.+3 ](mulnDr 3 1 ) ltnW // ltnS leq_mul2l /= add1n.14c3 2 +
(`d[↓[u (inord i)], si i]_smove +
`d[si i, if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 )]_smove +
`d[if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then si ((3 * i).+2 %/ 3 )
else ti ((3 * i).+2 %/ 3 ), u1 (inord (3 * i).+3 )]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
14a9
rewrite mod3E /= div3E.
rewrite ffunE inordK; last first .14c3 (3 * i).+3 < (3 * l.+1 ).+1
by rewrite -[(_ * _).+3 ](mulnDr 3 1 ) ltnS leq_mul2l /=.
rewrite -[(_ * _).+3 ](mulnDr 3 1 ) mod3E /= div3E.14c3 2 +
(`d[↓[u (inord i)], si i]_smove + `d[si i, ti i]_smove +
`d[ti i, ↓[u (inord (1 + i))]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
14a9
case : (sitiH i) => // _ _.14c3 `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ->
2 +
(`d[↓[u (inord i)], si i]_smove + `d[si i, ti i]_smove +
`d[ti i, ↓[u (inord (1 + i))]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
14a9
by rewrite /= add2n addn0 !addnA add1n.
have cH1 (k : 'I_(3 * l.+1 ).+1 ) :
0 < k < 3 * l.+1 -> codom (u1 k) \subset [:: p2; a[p1, p3] k].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac k : 'I_(3 * l.+1 ).+1
0 < k < 3 * l.+1 ->
codom (u1 k) \subset [:: p2; a[p1, p3] k]
rewrite !ffunE.1507 0 < k < 3 * l.+1 ->
codom
(if k %% 3 == 0
then ↓[u (inord (k %/ 3 ))]
else
if k %% 3 == 1 then si (k %/ 3 ) else ti (k %/ 3 )) \subset
[:: p2; a[p1, p3] k]
150a
case : eqP => [km3E0|/eqP km3D0].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 135d
0 < k < 3 * l.+1 ->
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] k]
rewrite {1 2 4 }(divn_eq k 3 ) km3E0 addn0.1515 0 < k %/ 3 * 3 < 3 * l.+1 ->
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 )]
1517
rewrite muln_gt0 andbT [_ * 3 ]mulnC ltn_mul2l /= => /andP[k3_gt0 k3Ll].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 135d 136c k3Ll : k %/ 3 < l.+1
136e 1517
rewrite apegMr //.
have := @H (inord (k %/ 3 )); rewrite ffunE inordK //; last first .
by apply : leq_trans k3Ll _.
by apply ; rewrite k3_gt0.
case : eqP => [km3E1|/eqP km3D1].5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 1362 1383
0 < k < 3 * l.+1 ->
codom (si (k %/ 3 )) \subset [:: p2; a[p1, p3] k]
rewrite {1 2 4 }(divn_eq k 3 ) km3E1 addn1 /= => H1.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 1362 1383 H1 : (k %/ 3 * 3 ).+1 < 3 * l.+1
codom (si (k %/ 3 )) \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 ).+1 ]
1537
have : 3 * (k %/ 3 ) < 3 * l.+1 .153e 3 * (k %/ 3 ) < 3 * l.+1
apply : leq_trans H1; first by rewrite mulnC ltnW.
rewrite ltn_mul2l /= => k3Ll1.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 1362 1383 153f k3Ll1 : k %/ 3 < l.+1
1540 1537
case : (sitiH (k %/ 3 )) => //.154e codom (si (k %/ 3 )) \subset
[:: p2; u (inord (k %/ 3 ).+1 ) ldisk] ->
codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
`d[u (inord (k %/ 3 )), u (inord (k %/ 3 ).+1 )]_smove =
D[[:: ↓[u (inord (k %/ 3 ))]; si (k %/ 3 );
ti (k %/ 3 ); ↓[u (inord (k %/ 3 ).+1 )]]].+2 ->
codom (si (k %/ 3 )) \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 ).+1 ]
1537
by rewrite apegS [_ * 3 ]mulnC apegMr // ukLE inordK // apegS.
have km3E2 : k %% 3 = 2 .
by case : (_ %% _) (ltn_mod k 3 ) km3D0 km3D1 => // [] [|[|]].
rewrite {1 2 4 }(divn_eq k 3 ) km3E2 addn2 /= -[_.+3 ](mulnDl 1 _ 3 ).155c (1 + k %/ 3 ) * 3 <= 3 * l.+1 ->
codom (ti (k %/ 3 )) \subset
[:: p2; a[p1, p3] (k %/ 3 * 3 ).+2 ]
150a
rewrite mulnC leq_mul2l /= add1n => H1.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 1508 1362 1388 139d H1 : k %/ 3 < l.+1
13a6 150a
rewrite codom_subC.
case : (sitiH (k %/ 3 )) => // _ sH _; move : sH.1567 codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 * 3 ).+2 ; p2]
150a
by rewrite ukLE // inordK ?(leq_trans H1) // !apegS [_ * 3 ]mulnC apegMr.
have {cH1}P2 :
(S_[3 * l.+1 ] n.+1 ).*2 <= sd u1 + sp (u1 ord0) (3 * l.+1 ) p1
+ sp (u1 ord_max) (3 * l.+1 )
(a[p1, p3] (3 * l.+1 )).150c (S_[3 * l.+1 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 + sp (n:=n.+1 ) (u1 ord0) (3 * l.+1 ) p1 +
sp (n:=n.+1 ) (u1 ord_max) (3 * l.+1 )
( a[p1, p3] (3 * l.+1 ))
by apply : IH cH1.
have {}P2 := leq_trans P2 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leq_sum_beta _ _)).5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac P2 : (S_[3 * l.+1 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 +
\sum_(k < n.+1 ) (u1 ord0 k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(u1 ord_max k != a[p1, p3] (3 * l.+1 )) *
(α_[1 ] k).*2
573
rewrite [X in _ <= _ + X + _]big_ord_recr /= ukLE eqxx addn0.1581 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u +
\sum_(i < n.+1 )
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1) *
β_[n.+2 , l.+1 ] i +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
rewrite [X in _ <= _ + X]big_ord_recr /= ukLE apegS eqxx addn0.1581 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u +
\sum_(i < n.+1 )
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1) *
β_[n.+2 , l.+1 ] i +
\sum_(i < n.+1 )
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] i
set x1S := \sum_(_ < n.+1 ) _ in P2; set x2S := \sum_(_ < n.+1 ) _ in P2.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac x1S := \sum_(H < n.+1 ) (u1 ord0 H != p1) * (α_[1 ] H).*2 : nat
x2S := \sum_(H < n.+1 )
(u1 ord_max H != a[p1, p3] (3 * l.+1 )) *
(α_[1 ] H).*2 : nat
P2 : (S_[3 * l.+1 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1 + x1S + x2S
158a
rewrite [X in _ <= _ + X + _](_ : _ = x1S); last first .158e \sum_(i < n.+1 )
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1) *
β_[n.+2 , l.+1 ] i = x1S
apply : eq_bigr => i _.5 129 556 557 558 11 15 16 17 12 13 14 559 570 1436 1437 55a 561 144c 1457 5eb 5f0 146b 148a 683 149d 14ac 158f 1590 1591 i : 'I_n.+1
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1) *
β_[n.+2 , l.+1 ] i = (u1 ord0 i != p1) * (α_[1 ] i).*2
1596
rewrite u10E ffunE /beta ifF; last first .159c (1 < l.+1 ) && (i == n.+2 .-1 ) = false
by rewrite eqn_leq [_ <= i]leqNgt ltn_ord !andbF.
by congr ((u _ _ != _) * _); apply /val_eqP; rewrite /=.
rewrite [X in _ <= _ + X](_ : _ = x2S); last first .158e \sum_(i < n.+1 )
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] i = x2S
apply : eq_bigr => i _.159c (u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] i =
(u1 ord_max i != a[p1, p3] (3 * l.+1 )) * (α_[1 ] i).*2
15b0
rewrite u1ME ffunE /beta ifF; last first .
by rewrite eqn_leq [_ <= i]leqNgt ltn_ord !andbF.
congr ((u _ _ != _) * _); first by apply /val_eqP.159c a[p3, p1] l = a[p1, p3] (3 * l.+1 )
15b0
by rewrite apegMr // apegS.
rewrite -P1 -!addnA addnC !addnA.158e (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+1 ) u1 + x1S + x2S + (l.+1 ).*2
apply : leq_trans (leq_add P2 (leqnn _)).158e (S_[l.+1 ] n.+2 ).*2 <=
(S_[3 * l.+1 ] n.+1 ).*2 + (l.+1 ).*2
by rewrite -doubleD leq_double dsum_alpha3l.
Qed .
End Case2 .
(* This corresponds to 4.2 *)
Section Case3 .
Variable n : nat.
Hypothesis IH :
forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l -> codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <= sd u + sp (u ord0) l p1 + sp (u ord_max) l (a[p1, p3] l).
Lemma case3 l (u : {ffun 'I_l.+2 -> configuration 4 n.+2 })
(p1 p2 p3 : peg 4 ) :
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(u ord0 ord_max = p1) ->
(u ord_max ord_max = a[p3, p1] l) ->
(S_[l.+1 ] n.+2 ).*2 <= sd u + sp (u ord0) l.+1 p1
+ sp (u ord_max) l.+1 (a[p3, p1] l).5 129 IH : forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <=
sd (n:=n.+1 ) u + sp (n:=n.+1 ) (u ord0) l p1 +
sp (n:=n.+1 ) (u ord_max) l ( a[p1, p3] l)
557 558 11 p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
Proof .15cf
move => p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0.5 129 15d2 557 558 11 15 16 17 12 13 14
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
move => cH KH1 KH2.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436
573
pose u':= ([ffun i => ↓[u i]] : {ffun 'I_l.+2 -> configuration 4 n.+1 })
: {ffun 'I_l.+2 -> configuration 4 n.+1 }.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a
573
have H: forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u' k) \subset [:: p2; a[p1, p3] k].
by move => k kH; rewrite ffunE; apply /codom_liftr/cH.
have apegpaD2 a : a[p1, p3] a != p2.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 228
562
by rewrite /apeg; case : odd; rewrite // eq_sym.
have apegpaD0 a : a[p1, p3] a != p0.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 228
569
by rewrite /apeg; case : odd; rewrite // eq_sym.
case : (pickP (fun i => u i ldisk != a[p1, p3] i)) => [x xH|pH]; last first .5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 pH : (fun i : ordinal_finType l.+2 =>
u i ldisk != a[p1, p3] i) =1 xpred0
573
have {pH}ukLE k : u k ldisk = a[p1, p3] k by have := pH k; case : eqP.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 ukLE : forall k : ordinal_finType l.+2 ,
u k ldisk = a[p1, p3] k
573 1604
have := case2 _ _ _ _ _ _ _ cH KH1 KH2 ukLE.160c ((forall (l : nat) (p1 p2 p3 : ordinal_eqType 4 )
(u : {ffun 'I_l.+1 -> configuration 4 n.+1 }),
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n.+1 ).*2 <=
sd (n:=n.+1 ) u +
sp (n:=n.+1 ) (u ord0) l ( a[p1, p3] 0 ) +
sp (n:=n.+1 ) (u ord_max) l ( a[p1, p3] l)) ->
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)) ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
1604
by apply .
have exH : exists x , u (inord x) ldisk != a[p1, p3] x.1606 exists x : nat, u (inord x) ldisk != a[p1, p3] x
exists x ; rewrite (_ : inord x = x) //.
by apply /val_eqP; rewrite /= inordK.
case : (@ex_minnP _ exH) => a aH {exH}aMin.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 aH : u (inord a) ldisk != a[p1, p3] a
aMin : forall n0 : nat,
u (inord n0) ldisk != a[p1, p3] n0 -> a <= n0
573
have exL : exists x , (x <= l) && (u (inord x) ord_max != a[p1, p3] x).1627 exists x : nat,
(x <= l) && (u (inord x) ord_max != a[p1, p3] x)
exists x ; apply /andP; split => //.
have := ltn_ord x.1627 x < l.+2 -> x <= l
1636
rewrite ltnS leq_eqVlt => /orP[] // /eqP xEl1.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 xEl1 : x = l.+1
1635 1636
case /eqP: xH.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 228 1628 1629 1641
u x ldisk = a[p1, p3] x
1636
rewrite (_ : x = ord_max); last by apply /val_eqP/eqP.1645 u ord_max ldisk = a[p1, p3] ord_max
1636
by apply /eqP/val_eqP; rewrite /= apegS.
by rewrite (_ : inord x = x) //; apply /val_eqP; rewrite /= inordK.
have exL1 y : (y <= l) && (u (inord y) ord_max != a[p1, p3] y) -> y <= l.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 y : nat
(y <= l) && (u (inord y) ord_max != a[p1, p3] y) ->
y <= l
by case /andP.
pose a1 := ex_maxn exL exL1.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a a1 := ex_maxn
(P:=fun x : nat =>
(x <= l) &&
(u (inord x) ord_max != a[p1, p3] x))
(m:=l) exL exL1 : nat
573
have a1H: u (inord a1) ldisk != a[p1, p3] a1.1661 u (inord a1) ldisk != a[p1, p3] a1
by rewrite /a1; case : ex_maxnP => i /andP[].
have a1Ll : a1 <= l by rewrite /a1; case : ex_maxnP => i /andP[].5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a a1Ll : a1 <= l
573
have a1Max i : a1 < i < l.+2 -> u (inord i) ord_max = a[p1, p3] i.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 14a
a1 < i < l.+2 -> u (inord i) ord_max = a[p1, p3] i
case /andP=> a1Li; rewrite ltnS leq_eqVlt => /orP[/eqP iEl1|iLl].5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 14a a1Li : a1 < i
iEl1 : i = l.+1
u (inord i) ord_max = a[p1, p3] i
rewrite iEl1 apegS (_ : inord l.+1 = ldisk) //.167f inord l.+1 = ldisk
1683
by apply /val_eqP; rewrite /= inordK.
move : a1Li; rewrite /a1; case : ex_maxnP => j _ /(_ i).5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 14a 1470 j : nat
((i <= l) && (u (inord i) ord_max != a[p1, p3] i) ->
i <= j) ->
j < i -> u (inord i) ord_max = a[p1, p3] i
1678
by case : eqP; rewrite // andbT => _ /(_ iLl); rewrite ltnNge => ->.
have aLld1 : a <= l.+1 .
rewrite -ltnS; apply : leq_trans (ltn_ord x).
rewrite ltnS; apply : aMin;rewrite (_ : inord x = x) //.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1631 165a 1662 166a 1672 167b
1620 169a
by apply /val_eqP; rewrite /= inordK.
(* Showing the symmetry of the problem *)
wlog aLl1Ba1 : u p1 p3 p1Dp3 p2Dp3 p3Dp0 apegpaD2 apegpaD0 p1Dp2 p1Dp0
{u' H xH exL exL1}cH KH1 KH2 a a1 aH aLld1 aMin a1H a1Ll a1Max /
a <= l.+1 - a1.169c (forall (u : {ffun 'I_l.+2 -> configuration 4 n.+2 })
(p1 p3 : peg 4 ),
p1 != p3 ->
p2 != p3 ->
p3 != p0 ->
(forall a : nat, a[p1, p3] a != p2) ->
(forall a : nat, a[p1, p3] a != p0) ->
p1 != p2 ->
p1 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
forall a a1 : nat,
u (inord a) ldisk != a[p1, p3] a ->
a <= l.+1 ->
(forall n0 : nat,
u (inord n0) ldisk != a[p1, p3] n0 -> a <= n0) ->
u (inord a1) ldisk != a[p1, p3] a1 ->
a1 <= l ->
(forall i : nat,
a1 < i < l.+2 -> u (inord i) ord_max = a[p1, p3] i) ->
a <= l.+1 - a1 ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)) ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
move => wH.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b wH : forall
(u : {ffun 'I_l.+2 -> configuration 4 n.+2 })
(p1 p3 : peg 4 ),
p1 != p3 ->
p2 != p3 ->
p3 != p0 ->
(forall a : nat, a[p1, p3] a != p2) ->
(forall a : nat, a[p1, p3] a != p0) ->
p1 != p2 ->
p1 != p0 ->
(forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
u ord0 ord_max = p1 ->
u ord_max ord_max = a[p3, p1] l ->
forall a a1 : nat,
u (inord a) ldisk != a[p1, p3] a ->
a <= l.+1 ->
(forall n0 : nat,
u (inord n0) ldisk != a[p1, p3] n0 -> a <= n0) ->
u (inord a1) ldisk != a[p1, p3] a1 ->
a1 <= l ->
(forall i : nat,
a1 < i < l.+2 ->
u (inord i) ord_max = a[p1, p3] i) ->
a <= l.+1 - a1 ->
(S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
573 16ac
case : (leqP a (l.+1 -a1)) => [aLl1Ba1|l1Ba1La].5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16b1
573
by apply : wH aLl1Ba1.
have a_gt0 : 0 < a by apply : leq_ltn_trans l1Ba1La.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0
573 16ac
pose u1 : {ffun 'I_l.+2 -> configuration 4 n.+2 } :=
[ffun i : 'I_l.+2 => u (inord (l.+1 - i))].5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 u1 := [ ffun i : 'I_l.+2 => u (inord (l.+1 - i))]
: {ffun 'I_l.+2 -> configuration 4 n.+2 } : {ffun 'I_l.+2 -> configuration 4 n.+2 }
573 16ac
have -> : sd u = sd u1.16c9 sd (n:=n.+2 ) u = sd (n:=n.+2 ) u1
have F : injective (fun i : 'I_l.+1 => (inord (l - i) : 'I_l.+1 )).16c9 injective (fun i : 'I_l.+1 => inord (l - i))
move => i j /val_eqP.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca i, j : 'I_l.+1
val (inord (l - i)) == val (inord (l - j)) -> i = j
16d6
have lBiLl (i1 : 'I_l.+1 ) : l - i1 < l.+1 .5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca i, j, i1 : 'I_l.+1
l - i1 < l.+1
by rewrite ltn_subLR ?leq_addl // -ltnS.
rewrite /= !inordK // => /eqP liE; apply /val_eqP => /=.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 16de 16e9 liE : l - i = l - j
i == j
16d6
rewrite -(subKn (_ : i <= l)); last by rewrite -ltnS.
by rewrite liE subKn // -ltnS.
rewrite [sd u](reindex_inj F) /=.16d8 \sum_(j < l.+1 )
`d[u (inord (inord (l - j))), u
(inord
(inord (l - j)).+1 )]_smove =
sd (n:=n.+2 ) u1
16cf
apply : eq_bigr => i _; rewrite !ffunE.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 16d9 14c4
`d[u (inord (inord (l - i))), u
(inord
(inord (l - i)).+1 )]_smove =
`d[u (inord (l.+1 - inord i)), u
(inord
(l.+1 - inord i.+1 ))]_smove
16cf
have iLl2 : i < l.+2 by apply : leq_trans (ltn_ord _) _.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 16d9 14c4 iLl2 : i < l.+2
1702 16cf
have lBiLl : l - i < l.+1 by rewrite ltn_subLR ?leq_addl // -ltnS.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 16d9 14c4 1707 lBiLl : l - i < l.+1
1702 16cf
have iLl : i <= l by rewrite -ltnS.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 16d9 14c4 1707 170c iLl : i <= l
1702 16cf
rewrite gdistC; last by apply /move_sym/ssym.1710 `d[u (inord (inord (l - i)).+1 ), u
(inord
(inord (l - i)))]_smove =
`d[u (inord (l.+1 - inord i)), u
(inord
(l.+1 - inord i.+1 ))]_smove
16cf
congr (`d[u _,u _]_smove).1710 inord (inord (l - i)).+1 = inord (l.+1 - inord i)
by apply /val_eqP; rewrite /= !inordK ?subSn .
by apply /val_eqP; rewrite /= !inordK // ?subSS ltnS // ltnW.
pose p1' := a[p1, p3] l; pose p3' := a[p3, p1] l.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca p1' := a[p1, p3] l : peg 4
p3' := a[p3, p1] l : peg 4
16d1 16ac
have -> : sp (u ord0) l.+1 p1 = sp (u1 ord_max) l.+1 (a[p1', p3'] l).1726 sp (n:=n.+2 ) (u ord0) l.+1 p1 =
sp (n:=n.+2 ) (u1 ord_max) l.+1 ( a[p1', p3'] l)
apply : eq_bigr => i _; congr (_ * _).5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 1727 1728 i : ordinal_finType n.+2
(u ord0 i != p1) = (u1 ord_max i != a[p1', p3'] l)
172d
rewrite -apegD addnn apegO odd_double /= apegS apeg0.1733 (u ord0 i != p1) = (u1 ord_max i != p1)
172d
by rewrite ffunE subnn inord_eq0.
have -> : sp (u ord_max) l.+1 (a[p3, p1] l) = sp (u1 ord0) l.+1 p3'.1726 sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l) =
sp (n:=n.+2 ) (u1 ord0) l.+1 p3'
apply : eq_bigr => i _; congr (_ * _).1733 (u ord_max i != a[p3, p1] l) = (u1 ord0 i != p3')
1741
rewrite ffunE subn0.1733 (u ord_max i != a[p3, p1] l) =
(u (inord l.+1 ) i != p3')
1741
suff -> : inord l.+1 = ord_max :> 'I_l.+2 by [].
by apply /val_eqP; rewrite /= inordK.
rewrite addnAC.1726 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u1 + sp (n:=n.+2 ) (u1 ord0) l.+1 p3' +
sp (n:=n.+2 ) (u1 ord_max) l.+1 ( a[p1', p3'] l)
16ac
have FF : (l.+1 - a1) <= l.+1 - (l.+1 - a).1726 l.+1 - a1 <= l.+1 - (l.+1 - a)
by rewrite leq_sub2l // leq_subLR addnC -leq_subLR ltnW.
have a1Ll1 : a1 <= l.+1 by rewrite (leq_trans a1Ll).5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16b6 16be 5a0 16ca 1727 1728 175d a1Ll1 : a1 <= l.+1
1755 16ac
apply : wH FF => //.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765
p3' != p1'
- 1767
by rewrite apeg_eqC eq_sym.
- 178c
by rewrite eq_sym apeg_neq // eq_sym.
- 1791
by rewrite apeg_neq // eq_sym.
- 1796
by move => b; rewrite !apeg_neq // eq_sym.
- 179b
by move => b; rewrite !apeg_neq // eq_sym.
- 17a0
by rewrite apeg_neq // eq_sym.
- 17a5
by rewrite apeg_neq // eq_sym.
- 17aa
move => k /andP[kH1 kH2]; rewrite ffunE.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 k : 'I_l.+2
kH1 : 0 < k
kH2 : k < l.+1
codom (u (inord (l.+1 - k))) \subset
[:: p2; a[p3', p1'] k]
17ac
have F1 : k <= l.+1 by apply : ltnW.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 17b2 17b3 17b4 F1 : k <= l.+1
17b5 17ac
have F2 : l.+1 - k < l.+2 .
by rewrite ltn_subLR // addnS ltnS leq_addl.
have -> : a[p3', p1'] k = a[p1, p3] (inord (l.+1 - k) : 'I_l.+2 ) .17c1 a[p3', p1'] k = a[p1, p3] (inord (l.+1 - k))
rewrite inordK // -apegD -apegS -addnS.17c1 a[p1, p3] (k + l.+1 ) = a[p1, p3] (l.+1 - k)
17ca
by rewrite [LHS]apegO [RHS]apegO oddD oddB //= addbC.
apply : cH; rewrite inordK // subn_gt0 // ltn_subLR // kH2 //=.5 129 15d2 557 558 11 15 16 17 12 13 14 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 17b2 17b3 17b4 17ba 17c2
l.+1 < k + l.+1
17ac
by rewrite addnS ltnS -{1 }[l.+1 ]add1n leq_add2r.
- 17da
rewrite !ffunE /p1' subn0 -[RHS]KH2; congr (u _ _); apply /val_eqP.1769 val (inord l.+1 ) == val ord_max
17dc
by rewrite /= inordK.
- 17e3
by rewrite !ffunE /p1' subnn inord_eq0 // KH1 /p3' -apegD addnn apeg_double.
- 17e8
rewrite ffunE inordK //=; last by rewrite ltnS leq_subr.1769 u (inord (l.+1 - (l.+1 - a1))) ldisk
!= a[p3', p1'] (l.+1 - a1)
17ea
rewrite subKn // -apegD apegO oddD oddB //= addbAC !addNb addbb /=.1769 u (inord a1) ldisk != a[p1, p3] (~~ ~~ odd a1)
17ea
by rewrite -oddS -apegO apegS.
- 17f5
by rewrite leq_subr.
- 17fa
move => k; rewrite ffunE.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 a81
u (inord (l.+1 - inord k)) ldisk != a[p3', p1'] k ->
l.+1 - a1 <= k
17fc
case : leqP => //; rewrite ltn_subRL addnC -ltn_subRL => kH.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 a81 kH : a1 < l.+1 - k
u (inord (l.+1 - inord k)) ldisk != a[p3', p1'] k ->
false
17fc
have kLl1 : k < l.+1 by rewrite -subn_gt0 (leq_ltn_trans _ kH).5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 a81 1807 kLl1 : k < l.+1
1808 17fc
rewrite inordK; last by rewrite ltnS ltnW.180c u (inord (l.+1 - k)) ldisk != a[p3', p1'] k -> false
17fc
have /a1Max-> : a1 < l.+1 - k < l.+2 by rewrite kH /= ltnS leq_subr.180c a[p1, p3] (l.+1 - k) != a[p3', p1'] k -> false
17fc
case /eqP; rewrite -apegD apegO oddB 1 ?ltnW // -oddD -apegO.180c a[p1, p3] (l.+1 + k) = a[p3, p1] (k + l)
17fc
by rewrite addSn addnC apegS.
- 181b
rewrite ffunE inordK ?ltnS ?leq_subr //.1769 u (inord (l.+1 - (l.+1 - a))) ldisk
!= a[p3', p1'] (l.+1 - a)
181d
rewrite subKn //.1769 u (inord a) ldisk != a[p3', p1'] (l.+1 - a)
181d
rewrite -apegD apegO oddD oddB //= !addNb addbAC addbb /=.1769 u (inord a) ldisk != a[p1, p3] (~~ ~~ odd a)
181d
by rewrite -oddS -apegO apegS.
- 182c
by rewrite -[a]prednK // subSS leq_subr.
move => k /andP[l1BaLk kLl2]; rewrite ffunE.5 129 15d2 557 558 11 15 16 17 12 13 14 559 570 1436 55a 561 144c 1457 1607 1608 228 1628 1629 1631 165a 1662 166a 1672 167b 59b 16be 5a0 16ca 1727 1728 1765 a81 l1BaLk : l.+1 - a < k
kLl2 : k < l.+2
u (inord (l.+1 - inord k)) ord_max = a[p3', p1'] k
16ac
rewrite inordK //; apply /eqP; case : eqP => // /eqP.1836 u (inord (l.+1 - k)) ord_max != a[p3', p1'] k ->
false
16ac
suff -> : a[p3', p1'] k = a[p1, p3] (l.+1 - k).1836 u (inord (l.+1 - k)) ord_max != a[p1, p3] (l.+1 - k) ->
false
by move => /aMin; rewrite leqNgt ltn_subLR // addnC -ltn_subLR // l1BaLk.
by rewrite [RHS]apegO oddB // -oddD -apegO addSn apegS addnC apegD.
pose u':= ([ffun i => ↓[u i]] : {ffun 'I_l.+2 -> configuration 4 n.+1 })
: {ffun 'I_l.+2 -> configuration 4 n.+1 }.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a
573
have H: forall k : 'I_l.+2 ,
0 < k < l.+1 -> codom (u' k) \subset [:: p2; a[p1, p3] k].
by move => k kH; rewrite ffunE; apply /codom_liftr/cH.
have aMin1 i : i < a -> u (inord i) ord_max = a[p1, p3] i.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 14a
58f
by case : (u (inord i) ord_max =P a[p1, p3] i) => // /eqP /aMin; case : leqP.
have a_gt0 : 0 < a.
have : 0 <= a by [].
rewrite leq_eqVlt => /orP[/eqP aE0|] //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 aE0 : 0 = a
1865 1866
by case /eqP: aH; rewrite inord_eq0 // -aE0.
pose ai : 'I_l.+2 := inord a.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5
573
have aiE : ai = a :> nat by rewrite inordK.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa
573
have aLa1 : a <= a1.
case : leqP => // => a1La.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa a1La : a1 < a
false
1881
by case /eqP: aH; apply : a1Max; rewrite a1La.
have uaLEp2 : u (inord a) ldisk = p2.1883 u (inord a) ldisk = p2
have /cH : 0 < (inord a : 'I_l.+2 ) < l.+1 .
by rewrite inordK // a_gt0 /= (leq_ltn_trans _ (_ : a1 < l.+1 )).
move => /subsetP/(_ (u (inord a) ldisk) (codom_f _ _)).1883 u (inord a) ldisk \in [:: p2; a[p1, p3] (inord a)] ->
u (inord a) ldisk = p2
1892
by rewrite !inE inordK // (negPf aH) orbF => /eqP.
have ua1LEp2 : u (inord a1) ldisk = p2.1894 u (inord a1) ldisk = p2
have /cH : 0 < (inord a1 : 'I_l.+2 ) < l.+1 .
by rewrite inordK // !ltnS (leq_trans a1Ll) // (leq_trans a_gt0).
move => /subsetP/(_ (u (inord a1) ldisk) (codom_f _ _)).1894 u (inord a1) ldisk \in [:: p2; a[p1, p3] (inord a1)] ->
u (inord a1) ldisk = p2
18ab
by rewrite !inE inordK ?ltnS ?(leq_trans a1Ll) // (negPf a1H) orbF => /eqP.
have a1_gt0 : 0 < a1 by apply : leq_trans a_gt0 _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae a1_gt0 : 0 < a1
573
pose b := a1 - a.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 b := a1 - a : nat
573
pose c := l.+1 - a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 c := l.+1 - a1 : nat
573
have c_gt0 : 0 < c by rewrite subn_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce c_gt0 : 0 < c
573
have l1E : l.+1 = a + b + c.
by rewrite /b /c [a + _]addnC subnK // addnC subnK // ltnW.
pose si i : configuration 4 n.+1 :=
sgdist1 p2 (u (inord i)) (u (inord i.+1 )).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb
573
pose ti i : configuration 4 n.+1 :=
sgdist2 p2 (u (inord i)) (u (inord i.+1 )).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0
573
have sitiH i : i < a.-1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 14a
5f5
move => iLa.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 14a 5fe
5ff 18eb
have iLa1 : i < a by rewrite (leq_trans iLa) // ssrnat.leq_pred.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 14a 5fe 604
5ff 18eb
apply : sgdistE; rewrite ?aMin1 // -1 ?[a]prednK //.
by rewrite apegS apeg_eqC.
by rewrite eq_sym.
pose pa := a[p1, p3] a.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e
573
pose sam1 : configuration 4 n.+1 := sgdist1 pa (u (inord a.-1 )) (u (inord a)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c
573
pose tam1 : configuration 4 n.+1 := sgdist2 pa (u (inord a.-1 )) (u (inord a)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91
573
have [sam1C tam1C duam1ua1E] :
[/\ codom sam1 \subset [:: pa; u (inord a) ldisk ],
codom tam1 \subset [:: u (inord a.-1 ) ldisk; pa] &
`d[u (inord a.-1 ), u (inord a)]_smove =
D[[:: ↓[u (inord a.-1 )]; sam1; tam1; ↓[u (inord a)]]].+2 ].
apply : sgdistE; rewrite /pa ?uaLEp2 ?aMin1 ?prednK //.190d a[p1, p3] a.-1 != a[p1, p3] a
1911
by rewrite -{2 }(prednK a_gt0) apegS apeg_eqC.
rewrite uaLEp2 in sam1C.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 b9a 63f sam1C : codom sam1 \subset [:: pa; p2]
573
have {}tam1C : codom tam1 \subset [:: p1; p3].
move : tam1C; rewrite aMin1; last by rewrite -{2 }[a]prednK.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f
bc3 1923
by rewrite /pa -{2 }[a]prednK // apegS codom_apeg.
pose u1 :=
[ffun i : 'I_(3 * a).+1 =>
if (i %% 3 ) == 0 then ↓[u (inord (i %/ 3 ))]
else if (i %% 3 ) == 1 then
(if i == (3 * a.-1 ).+1 :> nat then sam1 else si (i %/ 3 ))
else
(if i == (3 * a.-1 ).+2 :> nat then tam1 else ti (i %/ 3 ))].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a u1 := [ffun i => if i %% 3 == 0
then ↓[u (inord (i %/ 3 ))]
else
if i %% 3 == 1
then
if i == (3 * a.-1 ).+1 :> nat
then sam1
else si (i %/ 3 )
else
if i == (3 * a.-1 ).+2 :> nat
then tam1
else ti (i %/ 3 )] : {ffun forall x : ordinal_finType (3 * a).+1 ,
(fun => configuration 4 n.+1 ) x}
573
have u10E : u1 ord0 = ↓[u ord0] by rewrite ffunE /= inord_eq0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683
573
have uiME : u1 ord_max = ↓[u (inord a)] by rewrite ffunE /= mod3E /= div3E.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 uiME : u1 ord_max = ↓[u (inord a)]
573
have P1 : a.*2 + sd u1 = \sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove.1939 a.*2 + sd (n:=n.+1 ) u1 =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove
rewrite /sd.1939 a.*2 +
\sum_(i < 3 * a)
`d[u1 (inord i), u1 (inord i.+1 )]_smove =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove
193f
have -> := @sum3E _ (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_smove).1939 a.*2 +
\sum_(i < a)
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove
193f
have -> : a.*2 = \sum_(i < a) 2 .1939 a.*2 = \sum_(i < a) 2
by rewrite sum_nat_const /= cardT size_enum_ord muln2.1939 \sum_(i < a) 2 +
\sum_(i < a)
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove) =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove
193f
rewrite -big_split /=.1939 \sum_(i < a)
(2 +
(`d[u1 (inord (3 * i)), u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), u1 (inord (3 * i).+3 )]_smove)) =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove
193f
apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a i : 'I_a
739 193f
have -> : u1 (inord (3 * i)) = ↓[u (inord i)].
rewrite ffunE inordK; last by rewrite ltnS leq_mul2l /= ltnW.195d (if (3 * i) %% 3 == 0
then ↓[u (inord ((3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then
if 3 * i == (3 * a.-1 ).+1
then sam1
else si ((3 * i) %/ 3 )
else
if 3 * i == (3 * a.-1 ).+2
then tam1
else ti ((3 * i) %/ 3 )) = ↓[u (inord i)]
1962
by rewrite mod3E /= div3E.
have -> : u1 (inord (3 * i).+3 ) = ↓[u (inord i.+1 )].
rewrite -[(_ * _).+3 ](mulnDr 3 1 ).195d u1 (inord (3 * (1 + i))) = ↓[u (inord i.+1 )]
196e
rewrite ffunE inordK; last by rewrite ltnS leq_mul2l /=.195d (if (3 * (1 + i)) %% 3 == 0
then ↓[u (inord ((3 * (1 + i)) %/ 3 ))]
else
if (3 * (1 + i)) %% 3 == 1
then
if 3 * (1 + i) == (3 * a.-1 ).+1
then sam1
else si ((3 * (1 + i)) %/ 3 )
else
if 3 * (1 + i) == (3 * a.-1 ).+2
then tam1
else ti ((3 * (1 + i)) %/ 3 )) = ↓[u (inord i.+1 )]
196e
by rewrite mod3E /= div3E.195d 2 +
(`d[↓[u (inord i)], u1 (inord (3 * i).+1 )]_smove +
`d[u1 (inord (3 * i).+1 ), u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), ↓[u (inord i.+1 )]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
193f
have [/eqP iEa| iDa] := boolP (i == a.-1 :> nat).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 195e iEa : i = a.-1
197c
have -> : u1 (inord (3 * i).+1 ) = sam1.1980 u1 (inord (3 * i).+1 ) = sam1
rewrite ffunE inordK; last by rewrite ltnS ltn_mul2l /=.1980 (if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then
if (3 * i).+1 == (3 * a.-1 ).+1
then sam1
else si ((3 * i).+1 %/ 3 )
else
if (3 * i).+1 == (3 * a.-1 ).+2
then tam1
else ti ((3 * i).+1 %/ 3 )) = sam1
198a
rewrite mod3E /= div3E.1980 (if (3 * i).+1 == (3 * a.-1 ).+1 then sam1 else si i) =
sam1
198a
by rewrite iEa eqxx.1980 2 +
(`d[↓[u (inord i)], sam1]_smove +
`d[sam1, u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), ↓[u (inord i.+1 )]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
1982
have -> : u1 (inord (3 * i).+2 ) = tam1.1980 u1 (inord (3 * i).+2 ) = tam1
rewrite ffunE inordK; last first .1980 (3 * i).+2 < (3 * a).+1
by rewrite -[_.+3 ](mulnDr 3 1 ) ltnW // add1n ltnS leq_mul2l /=.
rewrite mod3E /= div3E.1980 (if (3 * i).+2 == (3 * a.-1 ).+2 then tam1 else ti i) =
tam1
199d
by rewrite iEa eqxx.
by rewrite iEa prednK // duam1ua1E /= -!addnA add2n !addnA addn0.
have -> : u1 (inord (3 * i).+1 ) = si i.
rewrite ffunE inordK; last by rewrite ltnS ltn_mul2l /=.1984 (if (3 * i).+1 %% 3 == 0
then ↓[u (inord ((3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then
if (3 * i).+1 == (3 * a.-1 ).+1
then sam1
else si ((3 * i).+1 %/ 3 )
else
if (3 * i).+1 == (3 * a.-1 ).+2
then tam1
else ti ((3 * i).+1 %/ 3 )) = si i
19b7
rewrite mod3E /= div3E.1984 (if (3 * i).+1 == (3 * a.-1 ).+1 then sam1 else si i) =
si i
19b7
by rewrite [_.+1 == _.+1 ]eqn_mul2l /= (negPf iDa).1984 2 +
(`d[↓[u (inord i)], si i]_smove +
`d[si i, u1 (inord (3 * i).+2 )]_smove +
`d[u1 (inord (3 * i).+2 ), ↓[u (inord i.+1 )]]_smove) =
`d[u (inord i), u (inord i.+1 )]_smove
193f
have -> : u1 (inord (3 * i).+2 ) = ti i.
rewrite ffunE inordK; last first .
by rewrite -[_.+3 ](mulnDr 3 1 ) ltnW // ltnS add1n leq_mul2l /=.1984 (if (3 * i).+2 %% 3 == 0
then ↓[u (inord ((3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then
if (3 * i).+2 == (3 * a.-1 ).+1
then sam1
else si ((3 * i).+2 %/ 3 )
else
if (3 * i).+2 == (3 * a.-1 ).+2
then tam1
else ti ((3 * i).+2 %/ 3 )) = ti i
19c9
rewrite mod3E /= div3E.1984 (if (3 * i).+2 == (3 * a.-1 ).+2 then tam1 else ti i) =
ti i
19c9
by rewrite [_.+1 == _.+1 ]eqn_mul2l /= (negPf iDa).
case : (sitiH i) => // [|_ _ ->].
rewrite -ltnS prednK //.
have := ltn_ord i; rewrite leq_eqVlt => /orP[] //.1984 i.+1 == a -> i.+1 < a
19e0
by rewrite -{2 }[a]prednK // [_ == _](negPf iDa).
by rewrite /= -!addnA add2n addn0.
have sitiHb i : a1 < i < l.+1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk ],
codom (ti i) \subset [:: u (inord i) ldisk; p2] &
`d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i; ↓[u (inord i.+1 )]]].+2 ].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 14a
a1 < i < l.+1 ->
[/\ codom (si i) \subset [:: p2; u (inord i.+1 ) ldisk],
codom (ti i) \subset [:: u (inord i) ldisk; p2]
& `d[u (inord i), u (inord i.+1 )]_smove =
D[[:: ↓[u (inord i)]; si i; ti i;
↓[u (inord i.+1 )]]].+2 ]
move => /andP[a1Li iLl].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 14a 1680 1470
5ff 19f5
apply : sgdistE => //;
rewrite !a1Max ?a1Li ?(leq_trans a1Li) // ?(leq_trans iLl) //.
by rewrite apegS apeg_eqC.
by rewrite eq_sym.
pose sa1 : configuration 4 n.+1 :=
sgdist1 (a[p1, p3] a1) (u (inord a1)) (u (inord a1.+1 )).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 sa1 := sgdist1 (n:=n.+1 ) ( a[p1, p3] a1)
(u (inord a1)) (u (inord a1.+1 ))
: configuration 4 n.+1 : configuration 4 n.+1
573
pose ta1 : configuration 4 n.+1 :=
sgdist2 (a[p1, p3] a1) (u (inord a1)) (u (inord a1.+1 )).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c ta1 := sgdist2 (n:=n.+1 ) ( a[p1, p3] a1)
(u (inord a1)) (u (inord a1.+1 ))
: configuration 4 n.+1 : configuration 4 n.+1
573
have [sa1C ta1C dua1uad1E] :
[/\ codom sa1 \subset [:: a[p1, p3] a1; u (inord a1.+1 ) ldisk ],
codom ta1 \subset [:: u (inord a1) ldisk; a[p1, p3] a1] &
`d[u (inord a1), u (inord a1.+1 )]_smove =
D[[:: ↓[u (inord a1)]; sa1 ; ta1; ↓[u (inord a1.+1 )]]].+2 ].1a10 [/\ codom sa1 \subset
[:: a[p1, p3] a1; u (inord a1.+1 ) ldisk],
codom ta1 \subset
[:: u (inord a1) ldisk; a[p1, p3] a1]
& `d[u (inord a1), u (inord a1.+1 )]_smove =
D[[:: ↓[u (inord a1)]; sa1; ta1;
↓[u (inord a1.+1 )]]].+2 ]
apply : sgdistE; rewrite ?ua1LEp2 ?a1Max ?leqnn // 1 ?eq_sym //.1a10 a[p1, p3] a1.+1 != a[p1, p3] a1
1a16
by rewrite apegS apeg_eqC eq_sym.
rewrite ua1LEp2 in ta1C.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a19 1a1b ta1C : codom ta1 \subset [:: p2; a[p1, p3] a1]
573
have {}sa1C : codom sa1 \subset [:: p1; p3].1a26 codom sa1 \subset [:: p1; p3]
move : sa1C; rewrite a1Max //; last by rewrite leqnn.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27
codom sa1 \subset [:: a[p1, p3] a1; a[p1, p3] a1.+1 ] ->
codom sa1 \subset [:: p1; p3]
1a2c
by rewrite apegS codom_apeg.
pose u2 :=
[ffun i : 'I_(3 * c).+1 =>
if (i %% 3 ) == 0 then ↓[u (inord (a1 +(i %/ 3 )))]
else if (i %% 3 ) == 1 then
(if i == 1 :> nat then sa1 else si (a1 + (i %/ 3 )))
else
(if i == 2 :> nat then ta1 else ti (a1 + (i %/ 3 )))].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f u2 := [ffun i => if i %% 3 == 0
then ↓[u (inord (a1 + i %/ 3 ))]
else
if i %% 3 == 1
then
if i == 1 :> nat
then sa1
else si (a1 + i %/ 3 )
else
if i == 2 :> nat
then ta1
else ti (a1 + i %/ 3 )] : {ffun forall x : ordinal_finType (3 * c).+1 ,
(fun => configuration 4 n.+1 ) x}
573
have u20E : u2 ord0 = ↓[u (inord a1)] by rewrite ffunE /= addn0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c u20E : u2 ord0 = ↓[u (inord a1)]
573
have u2ME : u2 ord_max = ↓[u ord_max].1a40 u2 ord_max = ↓[u ord_max]
rewrite ffunE /= mod3E /= div3E addnC subnK //.
by rewrite (_ : inord _ = ord_max) //; apply /val_eqP; rewrite /= inordK.
by rewrite ltnW // ltnS.
have P2 : c.*2 + sd u2 =
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove.1a48 c.*2 + sd (n:=n.+1 ) u2 =
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove
have -> : \sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < c) `d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove.1a48 \sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
rewrite -{1 }[a1]add0n big_addn big_mkord.1a48 \sum_(i < l.+1 - a1)
`d[u (inord (i + a1)), u (inord (i + a1).+1 )]_smove =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a62
by apply : eq_bigr => i _; rewrite addnC.1a48 c.*2 + sd (n:=n.+1 ) u2 =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
rewrite /sd.1a48 c.*2 +
\sum_(i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have -> := @sum3E _ (fun i => `d[u2 (inord i), u2 (inord i.+1 )]_smove).1a48 c.*2 +
\sum_(i < c)
(`d[u2 (inord (3 * i)), u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), u2 (inord (3 * i).+3 )]_smove) =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have -> : c.*2 = \sum_(i < c) 2 .1a48 c.*2 = \sum_(i < c) 2
by rewrite sum_nat_const /= cardT size_enum_ord muln2.1a48 \sum_(i < c) 2 +
\sum_(i < c)
(`d[u2 (inord (3 * i)), u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), u2 (inord (3 * i).+3 )]_smove) =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
rewrite -big_split /=.1a48 \sum_(i < c)
(2 +
(`d[u2 (inord (3 * i)), u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), u2 (inord (3 * i).+3 )]_smove)) =
\sum_(i < c)
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 i : 'I_c
2 +
(`d[u2 (inord (3 * i)), u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), u2 (inord (3 * i).+3 )]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have -> : u2 (inord (3 * i)) = ↓[u (inord (a1 + i))].1a87 u2 (inord (3 * i)) = ↓[u (inord (a1 + i))]
rewrite ffunE inordK; last by rewrite ltnS leq_mul2l /= ltnW.1a87 (if (3 * i) %% 3 == 0
then ↓[u (inord (a1 + (3 * i) %/ 3 ))]
else
if (3 * i) %% 3 == 1
then
if 3 * i == 1 then sa1 else si (a1 + (3 * i) %/ 3 )
else
if 3 * i == 2 then ta1 else ti (a1 + (3 * i) %/ 3 )) =
↓[u (inord (a1 + i))]
1a8e
by rewrite mod3E /= div3E.1a87 2 +
(`d[↓[u (inord (a1 + i))], u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), u2 (inord (3 * i).+3 )]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have -> : u2 (inord (3 * i).+3 ) = ↓[u (inord (a1 + i).+1 )].1a87 u2 (inord (3 * i).+3 ) = ↓[u (inord (a1 + i).+1 )]
rewrite -[(_ * _).+3 ](mulnDr 3 1 ).1a87 u2 (inord (3 * (1 + i))) = ↓[u (inord (a1 + i).+1 )]
1a9d
rewrite ffunE inordK; last by rewrite ltnS leq_mul2l /=.1a87 (if (3 * (1 + i)) %% 3 == 0
then ↓[u (inord (a1 + (3 * (1 + i)) %/ 3 ))]
else
if (3 * (1 + i)) %% 3 == 1
then
if 3 * (1 + i) == 1
then sa1
else si (a1 + (3 * (1 + i)) %/ 3 )
else
if 3 * (1 + i) == 2
then ta1
else ti (a1 + (3 * (1 + i)) %/ 3 )) =
↓[u (inord (a1 + i).+1 )]
1a9d
by rewrite mod3E /= div3E // add1n addnS.1a87 2 +
(`d[↓[u (inord (a1 + i))], u2 (inord (3 * i).+1 )]_smove +
`d[u2 (inord (3 * i).+1 ), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), ↓[u (inord (a1 + i).+1 )]]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have [/eqP iEa| iDa] := boolP (i == 0 :> nat).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a88 iEa : i = 0
1aab
have -> : u2 (inord (3 * i).+1 ) = sa1.1aaf u2 (inord (3 * i).+1 ) = sa1
rewrite ffunE inordK; last by rewrite ltnS ltn_mul2l /=.1aaf (if (3 * i).+1 %% 3 == 0
then ↓[u (inord (a1 + (3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then
if (3 * i).+1 == 1
then sa1
else si (a1 + (3 * i).+1 %/ 3 )
else
if (3 * i).+1 == 2
then ta1
else ti (a1 + (3 * i).+1 %/ 3 )) = sa1
1ab9
rewrite mod3E /=.1aaf (if (3 * i).+1 == 1
then sa1
else si (a1 + (3 * i).+1 %/ 3 )) = sa1
1ab9
by rewrite iEa eqxx.1aaf 2 +
(`d[↓[u (inord (a1 + i))], sa1]_smove +
`d[sa1, u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), ↓[u (inord (a1 + i).+1 )]]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1ab1
have -> : u2 (inord (3 * i).+2 ) = ta1.1aaf u2 (inord (3 * i).+2 ) = ta1
rewrite ffunE inordK; last first .1aaf (3 * i).+2 < (3 * c).+1
by rewrite -[_.+3 ](mulnDr 3 1 ) ltnW // add1n ltnS leq_mul2l /=.
rewrite mod3E /=.1aaf (if (3 * i).+2 == 2
then ta1
else ti (a1 + (3 * i).+2 %/ 3 )) = ta1
1acc
by rewrite iEa eqxx.
by rewrite iEa !addn0 // dua1uad1E /= -!addnA add2n !addnA addn0.
have -> : u2 (inord (3 * i).+1 ) = si (a1 + i).1ab3 u2 (inord (3 * i).+1 ) = si (a1 + i)
rewrite ffunE inordK; last by rewrite ltnS ltn_mul2l /=.1ab3 (if (3 * i).+1 %% 3 == 0
then ↓[u (inord (a1 + (3 * i).+1 %/ 3 ))]
else
if (3 * i).+1 %% 3 == 1
then
if (3 * i).+1 == 1
then sa1
else si (a1 + (3 * i).+1 %/ 3 )
else
if (3 * i).+1 == 2
then ta1
else ti (a1 + (3 * i).+1 %/ 3 )) = si (a1 + i)
1ae7
rewrite mod3E /= div3E.1ab3 (if (3 * i).+1 == 1 then sa1 else si (a1 + i)) =
si (a1 + i)
1ae7
by rewrite [_.+1 == _.+1 ](eqn_mul2l 3 _ 0 ) /= (negPf iDa).1ab3 2 +
(`d[↓[u (inord (a1 + i))], si (a1 + i)]_smove +
`d[si (a1 + i), u2 (inord (3 * i).+2 )]_smove +
`d[u2 (inord (3 * i).+2 ), ↓[u (inord (a1 + i).+1 )]]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
have -> : u2 (inord (3 * i).+2 ) = ti (a1 + i).1ab3 u2 (inord (3 * i).+2 ) = ti (a1 + i)
rewrite ffunE inordK; last first .
by rewrite -[_.+3 ](mulnDr 3 1 ) ltnW // ltnS add1n leq_mul2l /=.1ab3 (if (3 * i).+2 %% 3 == 0
then ↓[u (inord (a1 + (3 * i).+2 %/ 3 ))]
else
if (3 * i).+2 %% 3 == 1
then
if (3 * i).+2 == 1
then sa1
else si (a1 + (3 * i).+2 %/ 3 )
else
if (3 * i).+2 == 2
then ta1
else ti (a1 + (3 * i).+2 %/ 3 )) = ti (a1 + i)
1afa
rewrite mod3E /= div3E.1ab3 (if (3 * i).+2 == 2 then ta1 else ti (a1 + i)) =
ti (a1 + i)
1afa
by rewrite [_.+1 == _.+1 ](eqn_mul2l 3 _ 0 ) /= (negPf iDa).1ab3 2 +
(`d[↓[u (inord (a1 + i))], si (a1 + i)]_smove +
`d[si (a1 + i), ti (a1 + i)]_smove +
`d[ti (a1 + i), ↓[u (inord (a1 + i).+1 )]]_smove) =
`d[u (inord (a1 + i)), u (inord (a1 + i).+1 )]_smove
1a5a
case : (sitiHb (a1 + i)) => // [|_ _ ->].
rewrite -addn1 leq_add2l lt0n iDa /= -[l.+1 ](subnK (_ : a1 <= l.+1 )).1ab3 a1 + i < l.+1 - a1 + a1
by rewrite addnC ltn_add2r.
by rewrite ltnW.1ab3 2 +
(`d[↓[u (inord (a1 + i))], si (a1 + i)]_smove +
`d[si (a1 + i), ti (a1 + i)]_smove +
`d[ti (a1 + i), ↓[u (inord (a1 + i).+1 )]]_smove) =
D[[:: ↓[u (inord (a1 + i))]; si (a1 + i);
ti (a1 + i); ↓[u (inord (a1 + i).+1 )]]].+2
1a5a
by rewrite /= -!addnA add2n addn0.
have P3 :
\sum_(a <= i < a1) `d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove <=
\sum_(a <= i < a1) `d[u (inord i), u (inord i.+1 )]_smove.1a5c \sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove <=
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove
apply : leq_sum => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 14a
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove <=
`d[u (inord i), u (inord i.+1 )]_smove
1b2a
by apply : gdist_cunlift; apply : shanoi_connect.
have SH : 2 <= l ->
(S_[l.+1 ] n.+2 ).*2 <= S_[l.+1 ] n.+2 + S_[l] n.+1 + (α_[1 ] n.+1 ).*2 .1b2c 1 < l ->
(S_[l.+1 ] n.+2 ).*2 <=
S_[l.+1 ] n.+2 + S_[l] n.+1 + (α_[1 ] n.+1 ).*2
move => l_gt2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d l_gt2 : 1 < l
(S_[l.+1 ] n.+2 ).*2 <=
S_[l.+1 ] n.+2 + S_[l] n.+1 + (α_[1 ] n.+1 ).*2
1b3a
rewrite -addnn -!addnA leq_add2l.1b41 S_[l.+1 ] n.+2 <= S_[l] n.+1 + (α_[1 ] n.+1 ).*2
1b3a
by apply : dsum_alphaL_alpha.
have [/andP[a_gt1 c_gt1]|] := boolP ((1 < a) && (1 < c)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 c_gt1 : 1 < c
573
(* This is 4.2.1 *)
have l_gt0 : 0 < l by rewrite -ltnS l1E (leq_trans c_gt1) // leq_addl.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f l_gt0 : 0 < l
573 1b50
rewrite !sum_beta_S //= KH1 KH2 !eqxx !addn0.1b56 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1b50
pose u1l := [ffun i : 'I_(3 * a).-2 .+1 => u1 (inord i)].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 u1l := [ ffun i : 'I_(3 * a).-2 .+1 => u1 (inord i)] : {ffun forall x : ordinal_finType (3 * a).-2 .+1 ,
(fun i : 'I_(3 * a).-2 .+1 =>
(fun => configuration 4 n.+1 ) (inord i)) x}
1b5b 1b50
have a3_gt1 : 1 < (3 * a).-2 by rewrite -(subnK a_gt1) addn2 !mulnS.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 a3_gt1 : 1 < (3 * a).-2
1b5b 1b50
have c3_gt1 : 1 < (3 * c).-2 by rewrite -(subnK c_gt1) addn2 !mulnS.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 c3_gt1 : 1 < (3 * c).-2
1b5b 1b50
have cH1 (k : 'I_(3 * a).-2 .+1 ) :
0 < k < (3 * a).-2 -> codom (u1l k) \subset [:: p2; a[p1, p3] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848
0 < k < (3 * a).-2 ->
codom (u1l k) \subset [:: p2; a[p1, p3] k]
move => /andP[k_gt0 k3L3a].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 k3L3a : k < (3 * a).-2
codom (u1l k) \subset [:: p2; a[p1, p3] k]
1b70
have k3La1 : k %/ 3 <= a.-1 .
have kL3a : k <= 3 * (a.-1 ).
rewrite -[a.-1 ]subn1 mulnBr -ltnS -[3 *1 ]/(2 .+1 ) subnSK.
by rewrite subn2.
by rewrite (leq_mul2l 3 1 ).
by rewrite -[a.-1 ](mulKn _ (_ : 0 < 3 )) // leq_div2r.
have k3Ll : k %/ 3 < l.
rewrite -ltnS l1E (leq_trans (_ : _ < a.-1 .+3 )) //; last first .
rewrite prednK // addnAC -addn2 (leq_trans (_ : _ <= a + c)) //.
by rewrite leq_add2l.
by rewrite leq_addr.
by rewrite !ltnS ltnW // ltnS.
rewrite !ffunE inordK //; last first .
rewrite (leq_trans (ltn_ord _)) // -subn2 ltn_subLR.1b9d 3 * a < 2 + (3 * a).+1
by rewrite add2n ltnS // ltnW.
by rewrite (leq_trans (_ : _ < 3 * 1 )) // leq_mul2l.
rewrite {8 }(divn_eq k 3 ) apegD [_ * 3 ]mulnC apegMr //=.1b9d codom
(if k %% 3 == 0
then ↓[u (inord (k %/ 3 ))]
else
if k %% 3 == 1
then
if k == (3 * a.-1 ).+1 then sam1 else si (k %/ 3 )
else
if k == (3 * a.-1 ).+2 then tam1 else ti (k %/ 3 )) \subset
[:: p2;
a[ a[p1, p3] (k %% 3 ), a[p3, p1] (k %% 3 )]
(k %/ 3 )]
1b70
case : eqP => [km3E0 /= |/eqP km3D0].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b80 1b9e 135d
codom ↓[u (inord (k %/ 3 ))] \subset
[:: p2;
a[ a[p1, p3] (k %% 3 ), a[p3, p1] (k %% 3 )]
(k %/ 3 )]
have k3_gt0 : 0 < k %/ 3 .
case : (k: nat) k_gt0 km3E0 => // [] [|[|k1 _ _]] //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 1b78 1b80 1b9e k1 : nat
0 < k1.+3 %/ 3
1bda
by rewrite (divnMDl 1 k1 (_ : 0 < 3 )).
rewrite km3E0 !apeg0.
have /H : 0 < (inord (k %/ 3 ) : 'I_l.+2 ) < l.+1 .1bdc 0 < inord (k %/ 3 ) < l.+1
rewrite inordK //.
by rewrite k3_gt0 /= (leq_trans k3Ll).
by rewrite (leq_trans k3Ll) // ltnW.
by rewrite ffunE inordK // (leq_trans k3Ll) // ltnW .1bd4 codom
(if k %% 3 == 1
then
if k == (3 * a.-1 ).+1 then sam1 else si (k %/ 3 )
else
if k == (3 * a.-1 ).+2 then tam1 else ti (k %/ 3 )) \subset
[:: p2;
a[ a[p1, p3] (k %% 3 ), a[p3, p1] (k %% 3 )]
(k %/ 3 )]
1b70
case : eqP => [km3E1|/eqP km3D1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b80 1b9e 1362 1383
codom
(if k == (3 * a.-1 ).+1 then sam1 else si (k %/ 3 )) \subset
[:: p2;
a[ a[p1, p3] (k %% 3 ), a[p3, p1] (k %% 3 )]
(k %/ 3 )]
rewrite km3E1 !apegS !apeg0; case : eqP => [->|kE3a1].1c03 codom sam1 \subset
[:: p2; a[p3, p1] ((3 * a.-1 ).+1 %/ 3 )]
rewrite (_ : (3 * a.-1 ).+1 = a.-1 * 3 + 1 ); last by rewrite addn1 mulnC.1c03 codom sam1 \subset
[:: p2; a[p3, p1] ((a.-1 * 3 + 1 ) %/ 3 )]
1c0d
rewrite divnMDl // divn_small // addn0.1c03 codom sam1 \subset [:: p2; a[p3, p1] a.-1 ]
1c0d
by have := sam1C; rewrite codom_subC /pa -{1 }[a]prednK //= apegS.
move : k3La1; rewrite leq_eqVlt => /orP[/eqP k3Ea1| k3La].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b9e 1362 1383 1c10 k3Ea1 : k %/ 3 = a.-1
1c11
case : kE3a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b9e 1362 1383 1c21
k = (3 * a.-1 ).+1
1c22
by rewrite (divn_eq k 3 ) km3E1 k3Ea1 mulnC addn1.
case : (sitiH (k %/ 3 )) => // siH _ _; move : siH.1c24 codom (si (k %/ 3 )) \subset
[:: p2; u (inord (k %/ 3 ).+1 ) ldisk] ->
codom (si (k %/ 3 )) \subset
[:: p2; a[p3, p1] (k %/ 3 )]
1c05
by rewrite aMin1 ?apegS // -{2 }[a]prednK .1c07 codom
(if k == (3 * a.-1 ).+2 then tam1 else ti (k %/ 3 )) \subset
[:: p2;
a[ a[p1, p3] (k %% 3 ), a[p3, p1] (k %% 3 )]
(k %/ 3 )]
1b70
have km3E2 : k %% 3 = 2 .
by case : (_ %% _) (ltn_mod k 3 ) km3D0 km3D1 => // [] [|[|]].
rewrite km3E2 !apegS !apeg0; case : eqP => [kE3a1|kD3a1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b80 1b9e 1362 1388 139d kE3a1 : k = (3 * a.-1 ).+2
codom tam1 \subset [:: p2; a[p1, p3] (k %/ 3 )]
rewrite ltnNge in k3L3a; case /negP: k3L3a.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b80 1b9e 1362 1388 139d 1c43
(3 * a).-2 <= k
1c45
by rewrite kE3a1 -{1 }[a]prednK // mulnS.
move : k3La1; rewrite leq_eqVlt => /orP[/eqP k3Ea1| k3La].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b9e 1362 1388 139d 1c48 1c21
1c49
case : kD3a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 848 852 1b78 1b9e 1362 1388 139d 1c21
k = (3 * a.-1 ).+2
1c56
by rewrite (divn_eq k 3 ) km3E2 k3Ea1 mulnC addn2.
rewrite codom_subC.1c58 codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 ); p2]
1b70
case : (sitiH (k %/ 3 )) => // _ tiH _; move : tiH.1c58 codom (ti (k %/ 3 )) \subset
[:: u (inord (k %/ 3 )) ldisk; p2] ->
codom (ti (k %/ 3 )) \subset
[:: a[p1, p3] (k %/ 3 ); p2]
1b70
by rewrite aMin1 // -{2 }[a]prednK // ltnS ltnW.
have {cH1}P4 :
(S_[(3 * a).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * a).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * β_[n.+1 , (3 * a).-2 ] k +
\sum_(k < n.+1 ) (sam1 k != pa) * β_[n.+1 , (3 * a).-2 ] k.1b72 (S_[(3 * a).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * β_[n.+1 , (3 * a).-2 ] k +
\sum_(k < n.+1 )
(sam1 k != pa) * β_[n.+1 , (3 * a).-2 ] k
apply : leq_trans (IH _ _ _ _ _ _ cH1) _ => //.1b72 sd (n:=n.+1 ) u1l +
sp (n:=n.+1 ) (u1l ord0) (3 * a).-2 p1 +
sp (n:=n.+1 ) (u1l ord_max) (3 * a).-2
( a[p1, p3] (3 * a).-2 ) <=
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * β_[n.+1 , (3 * a).-2 ] k +
\sum_(k < n.+1 )
(sam1 k != pa) * β_[n.+1 , (3 * a).-2 ] k
1c70
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1b72 sd (n:=n.+1 ) u1l +
sp (n:=n.+1 ) (u1l ord0) (3 * a).-2 p1 +
sp (n:=n.+1 ) (u1l ord_max) (3 * a).-2
( a[p1, p3] (3 * a).-2 ) =
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * β_[n.+1 , (3 * a).-2 ] k +
\sum_(k < n.+1 )
(sam1 k != pa) * β_[n.+1 , (3 * a).-2 ] k
1c70
congr (_ + _ + _); apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 1b73 i : ordinal_finType (3 * a).-2
`d[u1l (inord i), u1l (inord i.+1 )]_smove =
`d[u1 (inord i), u1 (inord i.+1 )]_smove
- 1c7d
by rewrite ![u1l _]ffunE !inordK // ltnS // ltnW.
- 1c8a
by rewrite ffunE inord_eq0 // ffunE /= inord_eq0.
rewrite !ffunE /= inordK //; last first .1c84 (3 * a).-2 < (3 * a).+1
by rewrite ltnS -subn2 leq_subr.1c84 ((if (3 * a).-2 %% 3 == 0
then ↓[u (inord ((3 * a).-2 %/ 3 ))]
else
if (3 * a).-2 %% 3 == 1
then
if (3 * a).-2 == (3 * a.-1 ).+1
then sam1
else si ((3 * a).-2 %/ 3 )
else
if (3 * a).-2 == (3 * a.-1 ).+2
then tam1
else ti ((3 * a).-2 %/ 3 )) i
!= a[p1, p3] (3 * a).-2 ) * β_[n.+1 , (3 * a).-2 ] i =
(sam1 i != pa) * β_[n.+1 , (3 * a).-2 ] i
1c70
rewrite (_ : _.-2 = (3 * a.-1 ).+1 ); last first .1c84 (3 * a).-2 = (3 * a.-1 ).+1
by rewrite -{1 }[a]prednK // mulnS.
rewrite mod3E /= eqxx.1c84 (sam1 i != a[p1, p3] (3 * a.-1 ).+1 ) *
β_[n.+1 , (3 * a.-1 ).+1 ] i =
(sam1 i != pa) * β_[n.+1 , (3 * a.-1 ).+1 ] i
1c70
by rewrite /pa apegS apegMr //= -apegS prednK.
have {}P4 := leq_trans P4 (leq_add (leq_add (leqnn _)
(leq_sum_beta _ _)) (leqnn _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a P4 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(sam1 k != pa) * β_[n.+1 , (3 * a).-2 ] k
1b5b 1b50
set x1S := \sum_(_ < _.+1 ) _ in P4; set x2S := \sum_(_ < _.+1 ) _ in P4.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc x2S := \sum_(H < n.+1 )
(sam1 H != pa) * β_[n.+1 , (3 * a).-2 ] H : nat
P4 : (S_[(3 * a).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove + x1S +
x2S
1b5b 1b50
rewrite -/x1S.1cb5 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1b50
pose u2r := [ffun i : 'I_(3 * c).-2 .+1 => u2 (inord i.+2 )].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 u2r := [ ffun i : 'I_(3 * c).-2 .+1 => u2 (inord i.+2 )] : {ffun forall x : ordinal_finType (3 * c).-2 .+1 ,
(fun i : 'I_(3 * c).-2 .+1 =>
(fun => configuration 4 n.+1 ) (inord i.+2 ))
x}
1cbb 1b50
pose pa1 := a[p1, p3] a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 pa1 := a[p1, p3] a1 : peg 4
1cbb 1b50
pose pa1S := a[p1, p3] a1.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 pa1S := a[p1, p3] a1.+1 : peg 4
1cbb 1b50
have cH1 (k : 'I_(3 * c).-2 .+1 ) :
0 < k < (3 * c).-2 -> codom (u2r k) \subset [:: p2; a[pa1, pa1S] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca k : 'I_(3 * c).-2 .+1
0 < k < (3 * c).-2 ->
codom (u2r k) \subset [:: p2; a[pa1, pa1S] k]
move => /andP[k_gt0 k3L3a].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 k3L3a : k < (3 * c).-2
codom (u2r k) \subset [:: p2; a[pa1, pa1S] k]
1cd1
have k2L3c : k.+2 < (3 * c).
by have := k3L3a; rewrite -{2 }subn2 ltn_subRL add2n.
rewrite !ffunE inordK ?ltnS 1 ?ltnW //.1ce1 codom
(if k.+2 %% 3 == 0
then ↓[u (inord (a1 + k.+2 %/ 3 ))]
else
if k.+2 %% 3 == 1
then
if k.+2 == 1 then sa1 else si (a1 + k.+2 %/ 3 )
else
if k.+2 == 2 then ta1 else ti (a1 + k.+2 %/ 3 )) \subset
[:: p2; a[pa1, pa1S] k]
1cd1
case : eqP => [km3E0 /= |/eqP km3D0].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 km3E0 : k.+2 %% 3 = 0
codom ↓[u (inord (a1 + k.+2 %/ 3 ))] \subset
[:: p2; a[pa1, pa1S] k]
have k3_gt0 : 0 < k.+2 %/ 3 .
case : (k: nat) k_gt0 km3E0 => // [] //= k1 _ _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 1cd9 1ce2 1be2
1be3 1cf9
by rewrite (divnMDl 1 k1 (_ : 0 < 3 )).
have a1k3Ll1 : a1 + k.+2 %/ 3 < l.+1 .1cfb a1 + k.+2 %/ 3 < l.+1
move : k2L3c.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 1cd9 1cee 1cfc
k.+2 < 3 * c -> a1 + k.+2 %/ 3 < l.+1
1d08
rewrite {1 }(divn_eq k.+2 3 ) km3E0 addn0 mulnC ltn_mul2l /= => k2L3c.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 1cd9 1cee 1cfc k2L3c : k.+2 %/ 3 < c
1d07 1d08
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.1d14 a1 + k.+2 %/ 3 < l.+1 - a1 + a1
1d08
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 %/ 3 )) ; last first .1d0a a[pa1, pa1S] k = a[p1, p3] (a1 + k.+2 %/ 3 )
rewrite /pa1 /pa1S apegS -apegD -2 !apegS -!addSn addnC.1d0a a[p1, p3] (a1 + k.+2 ) = a[p1, p3] (a1 + k.+2 %/ 3 )
1d21
rewrite {1 }(divn_eq k.+2 3 ) km3E0 addn0 apegO.1d0a a[p3, p1] (~~ odd (a1 + k.+2 %/ 3 * 3 )) =
a[p1, p3] (a1 + k.+2 %/ 3 )
1d21
by rewrite oddD oddM andbT -oddD -apegO.
have /H : 0 < (inord (a1 + k.+2 %/ 3 ) : 'I_l.+2 ) < l.+1 .1d0a 0 < inord (a1 + k.+2 %/ 3 ) < l.+1
rewrite inordK; first by rewrite addn_gt0 a1_gt0.1d0a a1 + k.+2 %/ 3 < l.+2
1d33
by rewrite ltnS ltnW.
by rewrite ffunE inordK // ltnS ltnW.
case : eqP => [km3E1|/eqP km3D1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cf3 km3E1 : k.+2 %% 3 = 1
codom (if k.+2 == 1 then sa1 else si (a1 + k.+2 %/ 3 )) \subset
[:: p2; a[pa1, pa1S] k]
rewrite eqn_leq ltnNge /=.1d43 codom (si (a1 + k.+2 %/ 3 )) \subset
[:: p2; a[pa1, pa1S] k]
1d46
have a1La1k : a1 < a1 + k.+2 %/3 .
by rewrite -{1 }(addn0 a1) ltn_add2l divn_gt0.
have a1k3Ll : a1 + k.+2 %/ 3 < l.+1 .
move : (ltnW k2L3c).1d55 k.+1 < 3 * c -> a1 + k.+2 %/ 3 < l.+1
1d5d
rewrite {1 }(divn_eq k.+2 3 ) km3E1 addn1 mulnC ltn_mul2l /=.1d55 k.+2 %/ 3 < c -> a1 + k.+2 %/ 3 < l.+1
1d5d
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.1d55 k.+2 %/ 3 < c -> a1 + k.+2 %/ 3 < l.+1 - a1 + a1
1d5d
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 )) ; last first .1d5f a[pa1, pa1S] k = a[p1, p3] (a1 + k.+2 )
by rewrite /pa1S apegS -apegD !addnS addnC !apegS.
rewrite (_ : a[_, _ ] _ = a[p3, p1] (a1 + (k.+2 ) %/ 3 )) ; last first .1d5f a[p1, p3] (a1 + k.+2 ) = a[p3, p1] (a1 + k.+2 %/ 3 )
rewrite apegO oddD {1 }(divn_eq k.+2 3 ) oddD km3E1 addbT oddM andbT.1d5f a[p3, p1] (~~ (odd a1 (+) ~~ odd (k.+2 %/ 3 ))) =
a[p3, p1] (a1 + k.+2 %/ 3 )
1d7e
by rewrite addbN -oddD -oddS -apegO apegS.
case : (sitiHb (a1 + k.+2 %/ 3 )) => // [| siH _ _].1d5f a1 < a1 + k.+2 %/ 3 < l.+1
by rewrite a1La1k.
by move : siH; rewrite a1Max ?apegS // ltnS ltnW.
have km3E2 : k.+2 %% 3 = 2 .
by case : (_ %% _) (ltn_mod k.+2 3 ) km3D0 km3D1 => // [] [|[|]].
rewrite ifN; last by case : (k : nat) k_gt0.1d9c codom (ti (a1 + k.+2 %/ 3 )) \subset
[:: p2; a[pa1, pa1S] k]
1cd1
have a1La1k : a1 < a1 + k.+2 %/3 .
by rewrite -{1 }(addn0 a1) ltn_add2l divn_gt0.
have a1k3Ll : a1 + k.+2 %/ 3 < l.+1 .
have : k.+2 %/ 3 * 3 < 3 * c.1daa k.+2 %/ 3 * 3 < 3 * c
rewrite ltnW //.1daa (k.+2 %/ 3 * 3 ).+1 < 3 * c
1db8
move : (ltnW k2L3c).1daa k.+1 < 3 * c -> (k.+2 %/ 3 * 3 ).+1 < 3 * c
1db8
by rewrite {1 }(divn_eq k.+2 3 ) km3E2 addn2.
rewrite mulnC ltn_mul2l /=.
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 )) ; last first .
by rewrite /pa1 /pa1S apegS -apegD addnC !addnS !apegS.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + (k.+2 ) %/ 3 )) ; last first .
rewrite apegO /= oddD {1 }(divn_eq k.+2 3 ) !oddD oddM andbT.1db3 a[p3, p1]
(~~
(odd a1 (+) (odd (k.+2 %/ 3 ) (+) odd (k.+2 %% 3 )))) =
a[p1, p3] (a1 + k.+2 %/ 3 )
1ddb
by rewrite km3E2 addbF -oddD -apegO.
rewrite codom_subC.1db3 codom (ti (a1 + k.+2 %/ 3 )) \subset
[:: a[p1, p3] (a1 + k.+2 %/ 3 ); p2]
1cd1
case : (sitiHb (a1 + k.+2 %/ 3 )) => // [| _ tiH _]; first by rewrite a1La1k.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cf3 1d49 1d9d 1d56 1d60 tiH : codom (ti (a1 + k.+2 %/ 3 )) \subset
[:: u (inord (a1 + k.+2 %/ 3 )) ldisk; p2]
1de8 1cd1
by move : tiH; rewrite a1Max // a1La1k ltnS ltnW.
have P5 :
(S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 ) `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp ta1 (3 * c).-2 pa1 + sp ↓[u ord_max] (3 * c).-2 (a[p3, p1] l).1cd3 (S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp (n:=n.+1 ) ta1 (3 * c).-2 pa1 +
sp (n:=n.+1 ) ↓[u ord_max] (3 * c).-2 ( a[p3, p1] l)
apply : leq_trans (IH _ _ _ _ _ _ cH1) _; rewrite /pa1 /pa1S {cH1}//.1cc9 a[p1, p3] a1 != a[p1, p3] a1.+1
- 1dfa
by rewrite apegS apeg_eqC.
- 1e04
by rewrite eq_sym.1cc9 sd (n:=n.+1 ) u2r +
sp (n:=n.+1 ) (u2r ord0) (3 * c).-2 ( a[p1, p3] a1) +
sp (n:=n.+1 ) (u2r ord_max) (3 * c).-2
( a[ a[p1, p3] a1, a[p1, p3] a1.+1 ] (3 * c).-2 ) <=
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp (n:=n.+1 ) ta1 (3 * c).-2 ( a[p1, p3] a1) +
sp (n:=n.+1 ) ↓[u ord_max] (3 * c).-2 ( a[p3, p1] l)
1df5
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1cc9 sd (n:=n.+1 ) u2r =
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
- 1e0d
apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca i : ordinal_finType (3 * c).-2
`d[u2r (inord i), u2r (inord i.+1 )]_smove =
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
1e10
by rewrite ![u2r _]ffunE !inordK // ltnS // ltnW.
- 1e1d
apply : eq_bigr => i _; congr ((_ != _) * _).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1054
u2r ord0 i = ta1 i
1e1f
rewrite !ffunE /= !inordK //=.
by rewrite (leq_trans (_ : 2 < (3 * 1 ).+1 )) // ltnS leq_mul2l.1cc9 sp (n:=n.+1 ) (u2r ord_max) (3 * c).-2
( a[ a[p1, p3] a1, a[p1, p3] a1.+1 ] (3 * c).-2 ) =
sp (n:=n.+1 ) ↓[u ord_max] (3 * c).-2 ( a[p3, p1] l)
1df5
apply : eq_bigr => i _; congr ((_ != _) * _).1e24 u2r ord_max i = ↓[u ord_max] i
rewrite !ffunE /= !prednK ?muln_gt0 //=; last first .
by rewrite -subn1 ltn_subRL addn0 (leq_trans (_ : _ < 3 * 1 )) //
leq_mul2l.
rewrite inordK // mod3E /= div3E addnC subnK; last first .
by apply : (leq_trans a1Ll).
by rewrite ffunE; congr (u _ _ ); apply /val_eqP; rewrite /= inordK.
rewrite -[RHS]apegS -(subnK (_ : a1 <= l.+1 )) // -/c.1e24 a[ a[p1, p3] a1, a[p1, p3] a1.+1 ] (3 * c).-2 =
a[p1, p3] (c + a1)
rewrite apegS -apegD apegO oddD -subn2 oddB.1e24 a[p3, p1] (~~ (odd (3 * c) (+) odd 2 (+) odd a1)) =
a[p1, p3] (c + a1)
by rewrite addbF oddM /= -oddD -apegO.
by rewrite (leq_trans (_ : _ < 3 * 1 )) // leq_mul2l //.
by rewrite ltnW.
rewrite {cH1}//.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1df8
1cbb 1b50
have {}P5 :=
leq_trans P5 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca P5 : (S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp (n:=n.+1 ) ta1 (3 * c).-2 pa1 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
1cbb 1b50
set y1S := \sum_(_ < _) _ in P5; set y2S := sp _ _ _ in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca y1S := \sum_(H < (3 * c).-2 )
`d[u2 (inord H.+2 ), u2 (inord H.+3 )]_smove : nat
y2S := sp (n:=n.+1 ) ta1 (3 * c).-2 pa1 : nat
P5 : (S_[(3 * c).-2 ] n.+1 ).*2 <=
y1S + y2S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
1cbb 1b50
have [b_gt1|b_le2] := leqP 2 b.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1
1cbb
(* subcase b >= 2 *)
pose u3 := [ffun i : 'I_3 =>
if i == 0 :> nat then sam1
else if i == 1 :> nat then tam1 else ↓[u (inord a)]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 u3 := [ffun i => if i == 0 :> nat
then sam1
else
if i == 1 :> nat
then tam1
else ↓[u (inord a)]] : {ffun forall x : ordinal_finType 3 ,
(fun => configuration 4 n.+1 ) x}
1cbb 1e74
have cH6 (k : 'I_3) :
0 < k < 2 -> codom (u3 k) \subset [:: p1; a[p2, p3] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 994
0 < k < 2 ->
codom (u3 k) \subset [:: p1; a[p2, p3] k]
move => /andP[k_gt0 k_lt2].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 994 852 k_lt2 : k < 2
codom (u3 k) \subset [:: p1; a[p2, p3] k]
1e82
rewrite !ffunE.1e89 codom
(if k == 0
then sam1
else if k == 1 then tam1 else ↓[u (inord a)]) \subset
[:: p1; a[p2, p3] k]
1e82
by have ->/= : k = 1 :> nat by case : (k : nat) k_gt0 k_lt2 => // [] [|].
have P6 :
(S_[2 ] n.+1 ).*2 <=
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) + sp sam1 2 p2
+ sp ↓[u (inord a)] 2 p2.1e84 (S_[2 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
sp (n:=n.+1 ) sam1 2 p2 +
sp (n:=n.+1 ) ↓[u (inord a)] 2 p2
apply : (leq_trans (IH _ _ _ _ _ _ cH6)) => //.
by rewrite eq_sym.
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1e84 sd (n:=n.+1 ) u3 =
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove
- 1ea6
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK /=.
- 1eb0
by apply : eq_bigr => i _; rewrite !ffunE.
by apply : eq_bigr => i _; rewrite !ffunE.
rewrite {cH6}// in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1e9a
1cbb 1e74
set x3S := sp _ _ _ in P6; set y3S := sp _ _ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c x3S := sp (n:=n.+1 ) sam1 2 p2 : nat
y3S := sp (n:=n.+1 ) ↓[u (inord a)] 2 p2 : nat
P6 : (S_[2 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove + x3S + y3S
1cbb 1e74
have x2Sx3SE : x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 2 ] n.1ec1 x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 2 ] n
by apply : sum_alpha_diffE; by rewrite /pa.
rewrite (maxn_idPl _) // in x2Sx3SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 x2Sx3SE : x2S + x3S <= (S_[1 ] n).*2 + α_[(3 * a).-2 ] n
1cbb 1e74
pose u4 := [ffun i : 'I_b.+1 => ↓[u (inord (a + i))]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 u4 := [ffun i => ↓[u (inord (a + i))]] : {ffun forall x : ordinal_finType b.+1 ,
(fun => configuration 4 n.+1 ) x}
1cbb 1e74
pose paS := a[p1, p3] a.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f
1cbb 1e74
have cH7 (k : 'I_b.+1 ) :
0 < k < b -> codom (u4 k) \subset [:: p2; a[pa, paS] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 9c1
0 < k < b ->
codom (u4 k) \subset [:: p2; a[pa, paS] k]
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 9c1 852 k_ltb : k < b
codom (u4 k) \subset [:: p2; a[pa, paS] k]
1ee3
have akLl : a + k < l.+1 .
rewrite ltnS (leq_trans _ a1Ll) //.
by rewrite -(subnK aLa1) addnC leq_add2r ltnW.
rewrite !ffunE.1ef3 codom ↓[u (inord (a + k))] \subset
[:: p2; a[pa, paS] k]
1ee3
have /H : 0 < (inord (a + k) : 'I_l.+2 ) < l.+1 .1ef3 0 < inord (a + k) < l.+1
rewrite inordK; first by rewrite addn_gt0 a_gt0.
by rewrite ltnS ltnW.
rewrite ffunE inordK //; last by rewrite ltnS ltnW.1ef3 codom ↓[u (inord (a + k))] \subset
[:: p2; a[p1, p3] (a + k)] ->
codom ↓[u (inord (a + k))] \subset
[:: p2; a[pa, paS] k]
1ee3
by rewrite /pa /paS apegS -apegD [k + _]addnC.
have P7 :
(S_[b] n.+1 ).*2 <=
\sum_(i < b) `d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove +
sp ↓[u (inord a)] b pa + sp ↓[u (inord a1)] b (a[p1, p3] a1).1ee5 (S_[b] n.+1 ).*2 <=
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove +
sp (n:=n.+1 ) ↓[u (inord a)] b pa +
sp (n:=n.+1 ) ↓[u (inord a1)] b ( a[p1, p3] a1)
apply : leq_trans (IH _ _ _ _ _ _ cH7) (leq_add (leq_add _ _) _);
rewrite /pa /paS // 1 ?eq_sym //.1ee5 a[p1, p3] a.+1 != a[p1, p3] a
- 1f1e
by rewrite apegS apeg_eqC eq_sym.1ee5 sd (n:=n.+1 ) u4 <=
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove
- 1f2a
apply : leq_sum => i; rewrite !ffunE !inordK ?addnS //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 821
i.+1 < b.+1
by rewrite ltnS.
by rewrite ltnS ltnW.
- 1f3b
by apply : leq_sum => i _; rewrite !ffunE addn0.
apply : leq_sum => i _; rewrite !ffunE /= [a + b]addnC subnK //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1054
(u (inord a1) (trshift 1 i)
!= a[ a[p1, p3] a, a[p1, p3] a.+1 ] b) *
β_[n.+1 , b] i <=
(u (inord a1) (trshift 1 i) != a[p1, p3] a1) *
β_[n.+1 , b] i
1f19
by rewrite apegS -apegD subnK.
set x4S := sp _ _ _ in P7; set y4S := sp _ _ _ in P7.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 x4S := sp (n:=n.+1 ) ↓[u (inord a)] b pa : nat
y4S := sp (n:=n.+1 ) ↓[u (inord a1)] b ( a[p1, p3] a1) : nat
P7 : (S_[b] n.+1 ).*2 <=
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[
u (inord (a + i).+1 )]]_smove + x4S + y4S
1cbb 1e74
have y3Sx4SE : y3S + x4S <= (S_[1 ] n).*2 + α_[maxn 2 b] n.1f4d y3S + x4S <= (S_[1 ] n).*2 + α_[maxn 2 b] n
apply : sum_alpha_diffE => //; first by rewrite /pa eq_sym.1f4d codom ↓[u (inord a)] \subset [:: p2; pa]
1f55
apply : codom_liftr.1f4d codom (u (inord a)) \subset [:: p2; pa]
1f55
have := @cH (inord a); rewrite inordK //; apply .
by rewrite a_gt0 /= ltnS (leq_trans _ a1Ll).
rewrite (maxn_idPr _) // in y3Sx4SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 y3Sx4SE : y3S + x4S <= (S_[1 ] n).*2 + α_[b] n
1cbb 1e74
pose u5 := [ffun i : 'I_3 =>
if i == 0 :> nat then ↓[u (inord a1)]
else if i == 1 :> nat then sa1 else ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c u5 := [ffun i => if i == 0 :> nat
then ↓[u (inord a1)]
else if i == 1 :> nat then sa1 else ta1] : {ffun forall x : ordinal_finType 3 ,
(fun => configuration 4 n.+1 ) x}
1cbb 1e74
have cH8 (k : 'I_3) :
0 < k < 2 -> codom (u5 k) \subset [:: p1; a[p2, p3] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 994
0 < k < 2 ->
codom (u5 k) \subset [:: p1; a[p2, p3] k]
move => /andP[k_gt0 k_lt2].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 994 852 1e8a
codom (u5 k) \subset [:: p1; a[p2, p3] k]
1f77
rewrite !ffunE.1f7e codom
(if k == 0
then ↓[u (inord a1)]
else if k == 1 then sa1 else ta1) \subset
[:: p1; a[p2, p3] k]
1f77
by have ->/= : k = 1 :> nat by case : (k : nat) k_gt0 k_lt2 => // [] [|].
have P8 :
(S_[2 ] n.+1 ).*2 <=
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove) +
sp ↓[u (inord a1)] 2 p2 + sp ta1 2 p2.1f79 (S_[2 ] n.+1 ).*2 <=
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
sp (n:=n.+1 ) ↓[u (inord a1)] 2 p2 +
sp (n:=n.+1 ) ta1 2 p2
apply : (leq_trans (IH _ _ _ _ _ _ cH8)) => //; first by rewrite eq_sym.1f79 sd (n:=n.+1 ) u5 + sp (n:=n.+1 ) (u5 ord0) 2 p2 +
sp (n:=n.+1 ) (u5 ord_max) 2 ( a[p2, p3] 2 ) <=
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
sp (n:=n.+1 ) ↓[u (inord a1)] 2 p2 +
sp (n:=n.+1 ) ta1 2 p2
1f8b
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.1f79 sd (n:=n.+1 ) u5 =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove
- 1f94
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK /=.
- 1f9e
by apply : eq_bigr => i _; rewrite !ffunE.
by apply : eq_bigr => i _; rewrite !ffunE.
set x5S := sp _ _ _ in P8; set y5S := sp _ _ _ in P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a x5S := sp (n:=n.+1 ) ↓[u (inord a1)] 2 p2 : nat
y5S := sp (n:=n.+1 ) ta1 2 p2 : nat
P8 : (S_[2 ] n.+1 ).*2 <=
`d[↓[u (inord a1)], sa1]_smove +
`d[sa1, ta1]_smove + x5S + y5S
1cbb 1e74
have y4Sx5SE : y4S + x5S <= (S_[1 ] n).*2 + α_[maxn b 2 ] n.1fab y4S + x5S <= (S_[1 ] n).*2 + α_[maxn b 2 ] n
apply : sum_alpha_diffE => //.1fab codom ↓[u (inord a1)] \subset [:: a[p1, p3] a1; p2]
1fb3
apply : codom_liftr; rewrite codom_subC.1fab codom (u (inord a1)) \subset [:: p2; a[p1, p3] a1]
1fb3
have := @cH (inord a1); rewrite inordK //.1fab (0 < a1 < l.+1 ->
codom (u (inord a1)) \subset [:: p2; a[p1, p3] a1]) ->
codom (u (inord a1)) \subset [:: p2; a[p1, p3] a1]
by apply ; rewrite a1_gt0 /= ltnS.
by rewrite ltnS ltnW.
rewrite (maxn_idPl _) // in y4Sx5SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae y4Sx5SE : y4S + x5S <= (S_[1 ] n).*2 + α_[b] n
1cbb 1e74
have y2Sy5SE : y2S + y5S <= (S_[1 ] n).*2 + α_[maxn (3 * c).-2 2 ] n.1fcf y2S + y5S <= (S_[1 ] n).*2 + α_[maxn (3 * c).-2 2 ] n
apply : sum_alpha_diffE => //; first by rewrite /pa1.1fcf codom ta1 \subset [:: pa1; p2]
1fd5
by rewrite codom_subC.
rewrite (maxn_idPl _) // in y2Sy5SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 y2Sy5SE : y2S + y5S <= (S_[1 ] n).*2 + α_[(3 * c).-2 ] n
1cbb 1e74
rewrite (_ : sd u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove); last first .1fe3 sd (n:=n.+2 ) u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove
pose f i := `d[u (inord i), u (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 f := fun i : nat =>
`d[u (inord i), u (inord i.+1 )]_smove: nat -> nat
1fe8 1fe9
rewrite /sd -!(big_mkord xpredT f).1fef \sum_(0 <= i < l.+1 ) f i =
\sum_(0 <= i < a) f i +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove
1fe9
by rewrite -!big_cat_nat //= ltnW.
rewrite -{}P1 -{}P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 + sd (n:=n.+1 ) u2) + x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1e74
rewrite [X in _ <= _ + X + _ + _ + _ + _]
(_ : _ =
\sum_(i < (3 * a).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove
+ `d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove);
last first .1ffb sd (n:=n.+1 ) u1 =
\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove
pose f i := `d[u1 (inord i), u1 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 f := fun i : nat =>
`d[u1 (inord i), u1 (inord i.+1 )]_smove: nat -> nat
2000 2001
rewrite /sd -!(big_mkord xpredT f) .2007 \sum_(0 <= i < 3 * a) f i =
\sum_(0 <= i < (3 * a).-2 ) f i + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove
2001
rewrite -{1 }(subnK (_ : 1 < 3 * a)) //; last first .
by rewrite -[a]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recr /f //=; congr (_ + _ + _).2007 `d[u1 (inord (3 * a).-2 ), u1 (inord (3 * a).-2 .+1 )]_smove =
`d[sam1, tam1]_smove
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.2007 `d[if inord (3 * a.-1 ).+1 %% 3 == 0
then ↓[u (inord (inord (3 * a.-1 ).+1 %/ 3 ))]
else
if inord (3 * a.-1 ).+1 %% 3 == 1
then
if inord (3 * a.-1 ).+1 == (3 * a.-1 ).+1
then sam1
else si (inord (3 * a.-1 ).+1 %/ 3 )
else
if inord (3 * a.-1 ).+1 == (3 * a.-1 ).+2
then tam1
else ti (inord (3 * a.-1 ).+1 %/ 3 ), u1
(inord
(3 *
a.-1 ).+2 )]_smove =
`d[sam1, tam1]_smove
201a
rewrite inordK; last by rewrite ltnS ltn_mul2l /= prednK.2007 `d[if (3 * a.-1 ).+1 %% 3 == 0
then ↓[u (inord ((3 * a.-1 ).+1 %/ 3 ))]
else
if (3 * a.-1 ).+1 %% 3 == 1
then
if (3 * a.-1 ).+1 == (3 * a.-1 ).+1
then sam1
else si ((3 * a.-1 ).+1 %/ 3 )
else
if (3 * a.-1 ).+1 == (3 * a.-1 ).+2
then tam1
else ti ((3 * a.-1 ).+1 %/ 3 ), u1
(inord
(3 * a.-1 ).+2 )]_smove =
`d[sam1, tam1]_smove
201a
rewrite mod3E /= eqxx.2007 `d[sam1, u1 (inord (3 * a.-1 ).+2 )]_smove =
`d[sam1, tam1]_smove
201a
rewrite ffunE inordK; last first .2007 (3 * a.-1 ).+2 < (3 * a).+1
by rewrite -[_.+3 ](mulnDr 3 1 ) add1n prednK // ltnW.
by rewrite mod3E /= eqxx.2007 `d[u1 (inord (3 * a).-2 .+1 ), u1 (inord (3 * a).-2 .+2 )]_smove =
`d[tam1, ↓[u (inord a)]]_smove
2001
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.2007 `d[if inord (3 * a.-1 ).+2 %% 3 == 0
then ↓[u (inord (inord (3 * a.-1 ).+2 %/ 3 ))]
else
if inord (3 * a.-1 ).+2 %% 3 == 1
then
if inord (3 * a.-1 ).+2 == (3 * a.-1 ).+1
then sam1
else si (inord (3 * a.-1 ).+2 %/ 3 )
else
if inord (3 * a.-1 ).+2 == (3 * a.-1 ).+2
then tam1
else ti (inord (3 * a.-1 ).+2 %/ 3 ), u1
(inord
(3 *
a.-1 ).+3 )]_smove =
`d[tam1, ↓[u (inord a)]]_smove
2001
rewrite inordK; last first .
by rewrite -{2 }[a]prednK // mulnS.2007 `d[if (3 * a.-1 ).+2 %% 3 == 0
then ↓[u (inord ((3 * a.-1 ).+2 %/ 3 ))]
else
if (3 * a.-1 ).+2 %% 3 == 1
then
if (3 * a.-1 ).+2 == (3 * a.-1 ).+1
then sam1
else si ((3 * a.-1 ).+2 %/ 3 )
else
if (3 * a.-1 ).+2 == (3 * a.-1 ).+2
then tam1
else ti ((3 * a.-1 ).+2 %/ 3 ), u1
(inord
(3 * a.-1 ).+3 )]_smove =
`d[tam1, ↓[u (inord a)]]_smove
2001
rewrite mod3E /= eqxx.2007 `d[tam1, u1 (inord (3 * a.-1 ).+3 )]_smove =
`d[tam1, ↓[u (inord a)]]_smove
2001
rewrite ffunE inordK; last first .2007 (3 * a.-1 ).+3 < (3 * a).+1
by rewrite -{2 }[a]prednK // mulnS.
by rewrite -[(_ * _).+3 ](mulnDr 3 1 ) mod3E /= div3E add1n prednK.1ffb (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 + sd (n:=n.+1 ) u2) + x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1e74
rewrite [X in _ <= _ + (_ + X) + _ + _]
(_ : _ = `d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 ) `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove);
last first .1ffb sd (n:=n.+1 ) u2 =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
pose f i := `d[u2 (inord i), u2 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 f := fun i : nat =>
`d[u2 (inord i), u2 (inord i.+1 )]_smove: nat -> nat
2064 2065
rewrite /sd -!(big_mkord xpredT f) .206b \sum_(0 <= i < 3 * c) f i =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
2065
rewrite -{1 }(subnK (_ : 1 < 3 * c)) //; last first .
by rewrite -[c]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recl // /f /= !addnA; congr (_ + _ + _).206b `d[u2 (inord 0 ), u2 (inord 1 )]_smove =
`d[↓[u (inord a1)], sa1]_smove
- 207b
rewrite !ffunE !inordK ?addn0 //=.
by rewrite ltnS muln_gt0.
- 2089
rewrite !ffunE !inordK //=.
by rewrite ltnW // ltnS (leq_mul2l 3 1 c).
by rewrite ltnS muln_gt0.
by rewrite big_mkord.1ffb (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove)) +
x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1e74
rewrite -/y1S.1ffb (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
y1S)) + x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1e74
set z1S := \sum_(_ < _) _; set z2S := \sum_(_ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 z1S := \sum_(H < (3 * a).-2 )
`d[u1 (inord H), u1 (inord H.+1 )]_smove : nat
z2S := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) *
(α_[1 ] H).*2 : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
y1S)) + x1S + z2S
1e74
set z3S := \sum_(_ <= _ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 20a3 20a4 z3S := \sum_(a <= H < a1)
`d[u (inord H), u (inord H.+1 )]_smove : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) + z3S +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
y1S)) + x1S + z2S
1e74
rewrite -/z1S in P4; rewrite -/z2S in P5; rewrite -/z3S in P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ec4 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 20a3 20a4 20aa P4 : (S_[(3 * a).-2 ] n.+1 ).*2 <= z1S + x1S + x2S
P5 : (S_[(3 * c).-2 ] n.+1 ).*2 <= y1S + y2S + z2S
P3 : \sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[
u (inord i.+1 )]]_smove <= z3S
20ab 1e74
rewrite -[z1S + _ + _]addnA; set d1 := `d[_,_]_ _ + `d[_,_]_ _;
rewrite -/d1 in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fae 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b2 d1 := `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove : nat
P6 : (S_[2 ] n.+1 ).*2 <= d1 + x3S + y3S
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + (z1S + d1) + z3S +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
y1S)) + x1S + z2S
1e74
set d2 := `d[_,_]_ _ + `d[_,_]_ _; rewrite -/d2 in P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b2 20b7 20b8 d2 := `d[↓[u (inord a1)], sa1]_smove +
`d[sa1, ta1]_smove : nat
P8 : (S_[2 ] n.+1 ).*2 <= d2 + x5S + y5S
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + (z1S + d1) + z3S + (c.*2 + (d2 + y1S)) + x1S +
z2S
1e74
set xS := \sum_(_ <= _ < _) _ in P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f50 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf xS := \sum_(a <= H < a1)
`d[↓[u (inord H)], ↓[
u (inord H.+1 )]]_smove : nat
P3 : xS <= z3S
20c0 1e74
rewrite [X in _ <= X + _ + _](_ : _ = xS) in P7; last first .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove =
xS
rewrite /xS -[in RHS](add0n a) big_addn -/b big_mkord.20ca \sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove =
\sum_(i < b)
`d[↓[u (inord (i + a))], ↓[u (inord (i + a).+1 )]]_smove
20cc
by apply : eq_bigr => i _; rewrite [a + _]addnC.
have F1 := dsum_alphaL_S (3 * a).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf F1 : S_[(3 * a).-2 ] n.+1 =
S_[(3 * a).-2 ] n + α_[(3 * a).-2 ] n
20c0 1e74
have F2 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db F2 : S_[(3 * c).-2 ] n.+1 =
S_[(3 * c).-2 ] n + α_[(3 * c).-2 ] n
20c0 1e74
have F3 := dsum_alphaL_S b n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 F3 : S_[b] n.+1 = S_[b] n + α_[b] n
20c0 1e74
have F4_a : 2 * a = 2 + a.-1 + a.-1 .20e4 2 * a = 2 + a.-1 + a.-1
by rewrite -{1 }[a]prednK // mul2n -addnn addnS.
have F4_c : 2 * c = 2 + c.-1 + c.-1 .20ec 2 * c = 2 + c.-1 + c.-1
by rewrite -{1 }[c]prednK // mul2n -addnn addnS.
have F4 i k : 0 < i -> S_[i.-1 ] k.+1 <= S_[(3 *i).-2 ] k + i.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 i, k : nat
0 < i -> S_[i.-1 ] k.+1 <= S_[(3 * i).-2 ] k + i.-1
move => i_gt0; apply : leq_trans (dsum_alpha3l _ _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2100 i_gt0 : 0 < i
S_[3 * i.-1 ] k + i.-1 <= S_[(3 * i).-2 ] k + i.-1
2102
rewrite leq_add2r.2109 S_[3 * i.-1 ] k <= S_[(3 * i).-2 ] k
2102
apply : (increasingE (increasing_dsum_alphaL_l _)).2109 3 * i.-1 <= (3 * i).-2
2102
by rewrite -{2 }[i]prednK // mulnS addSn add2n /=.
have F4an := F4 a n a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 F4an : S_[a.-1 ] n.+1 <= S_[(3 * a).-2 ] n + a.-1
20c0 1e74
have F4an1 := F4 a n.+1 a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b F4an1 : S_[a.-1 ] n.+2 <= S_[(3 * a).-2 ] n.+1 + a.-1
20c0 1e74
have F4cn := F4 c n (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 F4cn : S_[c.-1 ] n.+1 <= S_[(3 * c).-2 ] n + c.-1
20c0 1e74
have F4cn1 := F4 c n.+1 (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 F4cn1 : S_[c.-1 ] n.+2 <= S_[(3 * c).-2 ] n.+1 + c.-1
20c0 1e74
have l_gt1 : 1 < l.
by rewrite -ltnS l1E -[3 ]/(2 + 0 + 1 ); rewrite !leq_add.
have F5 := SH l_gt1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 212a 4e4 F5 : (S_[l.+1 ] n.+2 ).*2 <=
S_[l.+1 ] n.+2 + S_[l] n.+1 + (α_[1 ] n.+1 ).*2
20c0 1e74
have F6 : S_[l.+1 ] n.+2 + S_[1 ] n.+2 <= S_[a.-1 ] n.+2 + S_[(b + c).+2 ] n.+2 .2138 S_[l.+1 ] n.+2 + S_[1 ] n.+2 <=
S_[a.-1 ] n.+2 + S_[(b + c).+2 ] n.+2
rewrite [X in _ <= X]addnC.2138 S_[l.+1 ] n.+2 + S_[1 ] n.+2 <=
S_[(b + c).+2 ] n.+2 + S_[a.-1 ] n.+2
213e
rewrite (_ : l.+1 = 1 + a.-2 + (b + c).+1 ); last first .2138 l.+1 = 1 + a.-2 + (b + c).+1
rewrite /b /c add1n -addSnnS !prednK //; last by rewrite -ltnS prednK.2138 l.+1 = a + (a1 - a + (l.+1 - a1))
214a
by rewrite addnCA addnA subnK // addnC subnK // ltnW.
rewrite (_ : a.-1 = 1 + a.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F7 : S_[l] n.+1 + S_[1 ] n.+1 <= S_[a.-1 ] n.+1 + S_[(b + c).+1 ] n.+1 .2140 S_[l] n.+1 + S_[1 ] n.+1 <=
S_[a.-1 ] n.+1 + S_[(b + c).+1 ] n.+1
rewrite [X in _ <= X]addnC.2140 S_[l] n.+1 + S_[1 ] n.+1 <=
S_[(b + c).+1 ] n.+1 + S_[a.-1 ] n.+1
2165
rewrite (_ : l = 1 + a.-2 + (b + c)); last first .2140 l = 1 + a.-2 + (b + c)
rewrite /b /c subSn // addnS -addSnnS add1n.2140 l = a.-2 .+2 + (a1 - a + (l - a1))
2171
rewrite !prednK //; last by rewrite -ltnS prednK.2140 l = a + (a1 - a + (l - a1))
2171
by rewrite addnCA addnA subnK // addnC subnK // ltnW.
rewrite (_ : a.-1 = 1 + a.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F8 : S_[(b + c).+2 ] n.+2 + S_[1 ] n.+2 <= S_[c.-1 ] n.+2 + S_[b.+4 ] n.+2 .2167 S_[(b + c).+2 ] n.+2 + S_[1 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[b.+4 ] n.+2
rewrite (_ : (b + c).+2 = 1 + b.+3 + (c.-2 )); last first .2167 (b + c).+2 = 1 + b.+3 + c.-2
by rewrite add1n 2 !addSnnS !prednK // -subn1 ltn_subRL addn0.
rewrite (_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F9 : S_[(b + c).+1 ] n.+1 + S_[1 ] n.+1 <= S_[c.-1 ] n.+1 + S_[b.+3 ] n.+1 .2191 S_[(b + c).+1 ] n.+1 + S_[1 ] n.+1 <=
S_[c.-1 ] n.+1 + S_[b.+3 ] n.+1
rewrite (_ : (b + c).+1 = 1 + b.+2 + (c.-2 )); last first .2191 (b + c).+1 = 1 + b.+2 + c.-2
by rewrite add1n 2 !addSnnS !prednK // -subn1 ltn_subRL addn0.
rewrite (_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F10 : S_[b.+4 ] n.+2 <= S_[b.+3 ] n.+1 + (α_[1 ] n.+1 ).*2 .21b0 S_[b.+4 ] n.+2 <= S_[b.+3 ] n.+1 + (α_[1 ] n.+1 ).*2
by apply : dsum_alphaL_alpha.
have F11 : S_[b.+3 ] n.+1 <= S_[b.+2 ] n + (α_[1 ] n).*2 .21ce S_[b.+3 ] n.+1 <= S_[b.+2 ] n + (α_[1 ] n).*2
by apply : dsum_alphaL_alpha.
have F12 : S_[b.+2 ] n + S_[1 ] n <= S_[b] n + S_[3 ] n.21d9 S_[b.+2 ] n + S_[1 ] n <= S_[b] n + S_[3 ] n
rewrite (_ : b.+2 = 1 + 2 + b.-1 ); last first .
by rewrite add1n addSnnS prednK // ltnW.
rewrite -{2 }[b]prednK; last by apply : ltnW.21d9 S_[1 + 2 + b.-1 ] n + S_[1 ] n <=
S_[b.-1 .+1 ] n + S_[3 ] n
21e2
by apply : concaveEk1 (concave_dsum_alphaL_l n).
have F13 : S_[1 ] n.+1 = (S_[3 ] n).+1 by rewrite dsum_alpha3_S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2141 2168 2192 21b1 21cf 21da 21e5 F13 : S_[1 ] n.+1 = (S_[3 ] n).+1
20c0 1e74
have F14 := leq_dsum_alpha_2l_1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2141 2168 2192 21b1 21cf 21da 21e5 21fb F14 : S_[1 ] n.+1 + S_[1 ] n.+2 <= (S_[2 ] n.+1 ).*2 .+1
20c0 1e74
have F15n := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2141 2168 2192 21b1 21cf 21da 21e5 21fb 2200 F15n : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
20c0 1e74
have F15n1 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 5d1 1e7c 1ec2 1ec3 1ed4 1ed9 98f 1ee6 1f4e 1f4f 1f6c 1f71 1f7a 1fac 1fad 1fd0 1fe4 20a3 20a4 20aa 20b0 20b1 20b7 20b8 20be 20bf 20c5 20c6 20cf 20db 20e0 20e5 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2141 2168 2192 21b1 21cf 21da 21e5 21fb 2200 2205 F15n1 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
20c0 1e74
by lia .
move : b_le2; rewrite leq_eqVlt => /orP[/eqP[] bE1|].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23
1cbb
(* subcase b = 1 *)
have a1E : a1 = a.+1 by rewrite -(subnK aLa1) -/b bE1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 a1E : a1 = a.+1
1cbb 2212
pose u3 := [ffun i : 'I_4 =>
if i == 0 :> nat then sam1
else if i == 1 :> nat then tam1
else if i == 2 :> nat then ↓[u (inord a)]
else ↓[u (inord a.+1 )]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 u3 := [ffun i => if i == 0 :> nat
then sam1
else
if i == 1 :> nat
then tam1
else
if i == 2 :> nat
then ↓[u (inord a)]
else ↓[u (inord a.+1 )]] : {ffun forall x : ordinal_finType 4 ,
(fun => configuration 4 n.+1 ) x}
1cbb 2212
have cH6 (k : 'I_4) :
0 < k < 3 -> codom (u3 k) \subset [:: pa1S; a[p2, pa1] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e e34
0 < k < 3 ->
codom (u3 k) \subset [:: pa1S; a[p2, pa1] k]
move => /andP[k_gt0 k_lt3].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e e34 852 k_lt3 : k < 3
codom (u3 k) \subset [:: pa1S; a[p2, pa1] k]
2224
rewrite !ffunE eqn_leq leqNgt k_gt0 /=.222b codom
(if k == 1
then tam1
else
if k == 2
then ↓[u (inord a)]
else ↓[u (inord a.+1 )]) \subset
[:: pa1S; a[p2, pa1] k]
2224
case : eqP => [->/=|/eqP kD1].222b codom tam1 \subset [:: pa1S; a[p2, pa1] 1 ]
by rewrite /pa1S !apegS apeg0 codom_apeg codom_subC.
have ->/= : k = 2 :> nat.
by apply /eqP; rewrite eqn_leq -ltnS k_lt3 ltn_neqAle eq_sym k_gt0 kD1.
apply : codom_liftr; rewrite codom_subC.2238 codom (u (inord a)) \subset [:: a[p2, pa1] 2 ; pa1S]
2224
have /cH : 0 < (inord a : 'I_l.+2 ) < l.+1 .
rewrite inordK //.
by rewrite a_gt0 /= l1E bE1 addn1 leq_addr.
by rewrite inordK // /pa1S a1E !apegS apeg0.
have P6 :
(S_[3 ] n.+1 ).*2 <=
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove) +
sp sam1 3 p2 + sp ↓[u (inord a.+1 )] 3 (a[p1, p3] a1).2226 (S_[3 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove +
sp (n:=n.+1 ) sam1 3 p2 +
sp (n:=n.+1 ) ↓[u (inord a.+1 )] 3 ( a[p1, p3] a1)
apply : (leq_trans (IH _ _ _ _ _ _ cH6)); rewrite /pa1S /pa1 //.
- 2264
by rewrite eq_sym.
- 226e
by rewrite eq_sym.
- 2273
by rewrite apegS apeg_eqC eq_sym.
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.2226 sd (n:=n.+1 ) u3 =
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
- 227b
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK /=.
- 2285
by apply : eq_bigr => i _; rewrite !ffunE /=.
by apply : eq_bigr => i _; rewrite !ffunE.
set x3S := sp _ _ _ in P6; set y3S := sp _ _ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 x3S := sp (n:=n.+1 ) sam1 3 p2 : nat
y3S := sp (n:=n.+1 ) ↓[u (inord a.+1 )] 3 ( a[p1, p3] a1) : nat
P6 : (S_[3 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove + x3S +
y3S
1cbb 2212
have x2Sx3SE : x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 3 ] n.2292 x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 3 ] n
by apply : sum_alpha_diffE; rewrite /pa.
rewrite (maxn_idPl _) in x2Sx3SE; last first .
by rewrite -subn2 ltn_subRL ltnW // (leq_mul2l 3 2 ).
pose u5 := [ffun i : 'I_3 =>
if i == 0 :> nat then ↓[u (inord a1)]
else if i == 1 :> nat then sa1 else ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71
1cbb 2212
have cH8 (k : 'I_3) :
0 < k < 2 -> codom (u5 k) \subset [:: p1; a[p2, p3] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 994
1f76
move => /andP[k_gt0 k_lt2].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 994 852 1e8a
1f7f 22b2
rewrite !ffunE.
by have ->/= : k = 1 :> nat by case : (k : nat) k_gt0 k_lt2 => // [] [|].
have P8 :
(S_[2 ] n.+1 ).*2 <=
(`d[↓[u (inord a.+1 )], sa1]_smove + `d[sa1, ta1]_smove) +
sp ↓[u (inord a.+1 )] 2 p2 + sp ta1 2 p2.22b4 (S_[2 ] n.+1 ).*2 <=
`d[↓[u (inord a.+1 )], sa1]_smove + `d[sa1, ta1]_smove +
sp (n:=n.+1 ) ↓[u (inord a.+1 )] 2 p2 +
sp (n:=n.+1 ) ta1 2 p2
apply : (leq_trans (IH _ _ _ _ _ _ cH8)) => //.
by rewrite eq_sym.
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.22b4 sd (n:=n.+1 ) u5 =
`d[↓[u (inord a.+1 )], sa1]_smove + `d[sa1, ta1]_smove
- 22d1
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK //= a1E.
- 22da
by apply : eq_bigr => i _; rewrite !ffunE a1E.
by apply : eq_bigr => i _; rewrite !ffunE.
set x5S := sp _ _ _ in P8; set y5S := sp _ _ _ in P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a x5S := sp (n:=n.+1 ) ↓[u (inord a.+1 )] 2 p2 : nat
1fad P8 : (S_[2 ] n.+1 ).*2 <=
`d[↓[u (inord a.+1 )], sa1]_smove +
`d[sa1, ta1]_smove + x5S + y5S
1cbb 2212
have y3Sx5SE : y3S + x5S <= (S_[1 ] n).*2 + α_[3 ] n.22e7 y3S + x5S <= (S_[1 ] n).*2 + α_[3 ] n
apply : sum_alpha_diffE => //.22e7 codom ↓[u (inord a.+1 )] \subset [:: a[p1, p3] a1; p2]
22ee
apply : codom_liftr; rewrite codom_subC.22e7 codom (u (inord a.+1 )) \subset [:: p2; a[p1, p3] a1]
22ee
have := @cH (inord a.+1 ); rewrite inordK ?a1E //.22e7 (0 < a.+1 < l.+1 ->
codom (u (inord a.+1 )) \subset
[:: p2; a[p1, p3] a.+1 ]) ->
codom (u (inord a.+1 )) \subset
[:: p2; a[p1, p3] a.+1 ]
by apply ; rewrite andTb //= ltnS -a1E.
by rewrite -a1E ltnS ltnW.
have y5Sy2SE : y5S + y2S <= (S_[1 ] n).*2 + α_[maxn 2 (3 * c).-2 ] n.22f0 y5S + y2S <= (S_[1 ] n).*2 + α_[maxn 2 (3 * c).-2 ] n
by apply : sum_alpha_diffE; rewrite // /pa1 eq_sym.
rewrite (maxn_idPr _) in y5Sy2SE; last first .
by rewrite -subn2 ltn_subRL (ltn_mul2l 3 1 ).
rewrite (_ : sd u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove);
last first .
pose f i := `d[u (inord i), u (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22e9 22f1 2319 1ff0
1fe8 2320
rewrite /sd -!(big_mkord xpredT f).
by rewrite -!big_cat_nat //= ltnW.
rewrite -{}P1 -{}P2; applyr P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22e9 22f1 2319
2 * S_[1 + l] (2 + n) <=
2 * a + sd (n:=1 + n) u1 + 2 * c + sd (n:=1 + n) u2 +
x1S +
\sum_(k < 1 + n)
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove
2212
rewrite (_ : sd u1 =
\sum_(i < (3 * a).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove
+ `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove); last first .
pose f i := `d[u1 (inord i), u1 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22e9 22f1 2319 2008
2000 2334
rewrite /sd -!(big_mkord xpredT f) .
rewrite -{1 }(subnK (_ : 1 < 3 * a)) //; last first .
by rewrite -[a]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recr /f //=; congr (_ + _ + _).
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.
rewrite inordK; last by rewrite ltnS ltn_mul2l /= prednK.
rewrite mod3E /= eqxx.
rewrite ffunE inordK; last first .
by rewrite -[_.+3 ](mulnDr 3 1 ) add1n prednK // ltnW.
by rewrite mod3E /= eqxx.
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.
rewrite inordK; last first .
by rewrite -{2 }[a]prednK // mulnS.
rewrite mod3E /= eqxx.
rewrite ffunE inordK; last first .
by rewrite -{2 }[a]prednK // mulnS.
by rewrite -[(_ * _).+3 ](mulnDr 3 1 ) mod3E /= div3E add1n prednK.232f 2 * S_[1 + l] (2 + n) <=
2 * a +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
2 * c + sd (n:=1 + n) u2 + x1S +
\sum_(k < 1 + n)
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove
2212
rewrite (_ : sd u2 =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove); last first .
pose f i := `d[u2 (inord i), u2 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22e9 22f1 2319 206c
2064 2384
rewrite /sd -!(big_mkord xpredT f) .
rewrite -{1 }(subnK (_ : 1 < 3 * c)) //; last first .
by rewrite -[c]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recl // /f /= !addnA.238a `d[u2 (inord 0 ), u2 (inord 1 )]_smove +
`d[u2 (inord 1 ), u2 (inord 2 )]_smove +
\sum_(0 <= i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
2384
congr (_ + _ + _).
- 239b
rewrite !ffunE !inordK ?addn0 //=.
by rewrite ltnS muln_gt0.
- 23a5
rewrite !ffunE !inordK //=.
by rewrite ltnW // ltnS (leq_mul2l 3 1 c).
by rewrite ltnS muln_gt0.
by rewrite big_mkord.232f 2 * S_[1 + l] (2 + n) <=
2 * a +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
2 * c +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove) + x1S +
\sum_(k < 1 + n)
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove
2212
rewrite (_ : \sum_(_ <= _ < _) _ =
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove); last first .232f \sum_(a <= H < a1)
`d[↓[u (inord H)], ↓[u (inord H.+1 )]]_smove =
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
by rewrite a1E big_nat1.232f 2 * S_[1 + l] (2 + n) <=
2 * a +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
2 * c +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove) + x1S +
\sum_(k < 1 + n)
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
2212
set z1S := \sum_(_ < _) _ in P4; set z2S := \sum_(_ < _) _ in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22e9 22f1 2319 20a3 20b0 20a4 20b1
23c1 2212
rewrite -/z1S -/z2S.23c5 2 * S_[1 + l] (2 + n) <=
2 * a +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) + 2 * c +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove) + x1S +
z2S + `d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
2212
rewrite -a1E in P8; set d2 := `d[_,_]_ _ + `d[_,_]_ _ in P8; rewrite -/d2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 2295 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf
2 * S_[1 + l] (2 + n) <=
2 * a +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) + 2 * c +
(d2 +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove) + x1S +
z2S + `d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
2212
set d1 := `d[_,_]_ _ + `d[_,_]_ _ + `d[_,_]_ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf d1 := `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove : nat
P6 : (S_[3 ] n.+1 ).*2 <= d1 + x3S + y3S
23ce 2212
rewrite -/y1S.23d2 2 * S_[1 + l] (2 + n) <=
2 * a +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) + 2 * c + (d2 + y1S) +
x1S + z2S +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove
2212
changer (2 * a + 2 * c + x1S + y1S + z1S + z2S + d2 +
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove)). 23d2 2 * S_[1 + l] (2 + n) <=
2 * a + 2 * c + x1S + y1S + z1S + z2S + d2 +
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], ↓[u (inord a.+1 )]]_smove)
2212
rewrite -/d1.23d2 2 * S_[1 + l] (2 + n) <=
2 * a + 2 * c + x1S + y1S + z1S + z2S + d2 + d1
2212
have F1 := dsum_alphaL_S (3 * a).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db
23e0 2212
have F2 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0
23e0 2212
have F3 := dsum_alphaL_S 3 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 F3 : S_[3 ] n.+1 = S_[3 ] n + α_[3 ] n
23e0 2212
have F4_a : 2 * a = 2 + a.-1 + a.-1 .
by rewrite -{1 }[a]prednK // mul2n -addnn addnS.
have F4_c : 2 * c = 2 + c.-1 + c.-1 .
by rewrite -{1 }[c]prednK // mul2n -addnn addnS.
have F4 i k : 0 < i -> S_[i.-1 ] k.+1 <= S_[(3 *i).-2 ] k + i.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2100
2101
move => i_gt0; apply : leq_trans (dsum_alpha3l _ _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2100 210a
210b 2404
rewrite leq_add2r.
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[i]prednK // mulnS addSn add2n /=.
have F4an := F4 a n a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b
23e0 2212
have F4an1 := F4 a n.+1 a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120
23e0 2212
have F4cn := F4 c n (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125
23e0 2212
have F4cn1 := F4 c n.+1 (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a
23e0 2212
have l_gt1 : 1 < l.
by rewrite -ltnS l1E -[3 ]/(2 + 0 + 1 ); rewrite !leq_add.
have F5 := SH l_gt1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139
23e0 2212
have F6n : S_[1 ] n.+1 = (S_[3 ] n).+1 by rewrite dsum_alpha3_S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 F6n : S_[1 ] n.+1 = (S_[3 ] n).+1
23e0 2212
have F6n1 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1 by rewrite dsum_alpha3_S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 F6n1 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1
23e0 2212
have am1_gt0 : 0 < a.-1 by rewrite -subn1 ltn_subRL addn0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b
23e0 2212
have F7n1 : S_[1 ] n.+2 + S_[l.+1 ] n.+2 <= S_[a.-1 ] n.+2 + S_[c.+3 ] n.+2 .243e S_[1 ] n.+2 + S_[l.+1 ] n.+2 <=
S_[a.-1 ] n.+2 + S_[c.+3 ] n.+2
rewrite addnC (_ : l.+1 = 1 + c.+2 + a.-2 ); last first .243e l.+1 = 1 + c.+2 + a.-2
by rewrite /c a1E add1n !addSnnS !prednK ?subnK // -a1E ltnW.
rewrite {2 }(_ : a.-1 = 1 + a.-2 ); last by rewrite add1n prednK.243e S_[1 + c.+2 + a.-2 ] n.+2 + S_[1 ] n.+2 <=
S_[1 + a.-2 ] n.+2 + S_[c.+3 ] n.+2
2443
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F7n : S_[1 ] n.+1 + S_[l] n.+1 <= S_[a.-1 ] n.+1 + S_[c.+2 ] n.+1 .2445 S_[1 ] n.+1 + S_[l] n.+1 <=
S_[a.-1 ] n.+1 + S_[c.+2 ] n.+1
rewrite addnC (_ : l = 1 + c.+1 + a.-2 ); last first .
by rewrite /c a1E add1n subSS !addSnnS !prednK ?subnK // -ltnS -a1E ltnW.
rewrite {2 }(_ : a.-1 = 1 + a.-2 ); last by rewrite add1n prednK.2445 S_[1 + c.+1 + a.-2 ] n.+1 + S_[1 ] n.+1 <=
S_[1 + a.-2 ] n.+1 + S_[c.+2 ] n.+1
245c
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have cm1_gt0 : 0 < c.-1 by rewrite -subn1 ltn_subRL addn0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b 2446 245f cm1_gt0 : 0 < c.-1
23e0 2212
have F8n1 : S_[1 ] n.+2 + S_[c.+3 ] n.+2 <= S_[c.-1 ] n.+2 + S_[5 ] n.+2 .2474 S_[1 ] n.+2 + S_[c.+3 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[5 ] n.+2
rewrite addnC (_ : c.+3 = 1 + 4 + c.-2 ); last first .
by rewrite add1n 2 !addSnnS !prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last by rewrite add1n prednK.2474 S_[1 + 4 + c.-2 ] n.+2 + S_[1 ] n.+2 <=
S_[1 + c.-2 ] n.+2 + S_[5 ] n.+2
247a
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F8n : S_[1 ] n.+1 + S_[c.+2 ] n.+1 <= S_[c.-1 ] n.+1 + S_[4 ] n.+1 .247c S_[1 ] n.+1 + S_[c.+2 ] n.+1 <=
S_[c.-1 ] n.+1 + S_[4 ] n.+1
rewrite addnC (_ : c.+2 = 1 + 3 + c.-2 ); last first .
by rewrite add1n 2 !addSnnS !prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last by rewrite add1n prednK.247c S_[1 + 3 + c.-2 ] n.+1 + S_[1 ] n.+1 <=
S_[1 + c.-2 ] n.+1 + S_[4 ] n.+1
2493
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F9 : S_[5 ] n.+2 <= S_[4 ] n.+1 + (α_[1 ] n.+1 ).*2 .2495 S_[5 ] n.+2 <= S_[4 ] n.+1 + (α_[1 ] n.+1 ).*2
by apply : dsum_alphaL_alpha.
have F10 : S_[4 ] n.+1 <= S_[3 ] n + (α_[1 ] n).*2 .24ae S_[4 ] n.+1 <= S_[3 ] n + (α_[1 ] n).*2
by apply : dsum_alphaL_alpha.
have F11 : S_[1 ] n.+1 = (S_[3 ] n).+1 by rewrite dsum_alpha3_S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b 2446 245f 2475 247d 2496 24af 24ba F11 : S_[1 ] n.+1 = (S_[3 ] n).+1
23e0 2212
have F12 := leq_dsum_alpha_2l_1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b 2446 245f 2475 247d 2496 24af 24ba 24c2 F12 : S_[1 ] n.+1 + S_[1 ] n.+2 <= (S_[2 ] n.+1 ).*2 .+1
23e0 2212
have F13n1 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b 2446 245f 2475 247d 2496 24af 24ba 24c2 24c7 F13n1 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
23e0 2212
have F13n := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e b23 2219 221e 2227 2293 2294 1ed4 1f71 1f7a 22e8 1fad 22f1 2319 20a3 20b0 20a4 20b1 20be 20bf 23d3 23d4 20db 20e0 23ed 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 2435 243a b2b 2446 245f 2475 247d 2496 24af 24ba 24c2 24c7 24cc F13n : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
23e0 2212
rewrite !add1n !add2n.24d0 2 * S_[l.+1 ] n.+2 <=
2 * a + 2 * c + x1S + y1S + z1S + z2S + d2 + d1
2212
by lia .
(* subcase b = 0 *)
rewrite !ltnS leqn0 => /eqP bE0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f
1cbb 1b50
have a1E : a1 = a by rewrite -(subnK aLa1) -/b bE0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f a1E : a1 = a
1cbb 1b50
pose u3 := [ffun i : 'I_5 =>
if i == 0 :> nat then sam1
else if i == 1 :> nat then tam1
else if i == 2 :> nat then ↓[u (inord a)]
else if i == 3 :> nat then sa1
else ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 u3 := [ffun i => if i == 0 :> nat
then sam1
else
if i == 1 :> nat
then tam1
else
if i == 2 :> nat
then ↓[u (inord a)]
else
if i == 3 :> nat then sa1 else ta1] : {ffun forall x : ordinal_finType 5 ,
(fun => configuration 4 n.+1 ) x}
1cbb 1b50
have cH6 (k : 'I_5) :
0 < k < 4 -> codom (u3 k) \subset [:: pa1; a[p2, pa1S] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 1192
0 < k < 4 ->
codom (u3 k) \subset [:: pa1; a[p2, pa1S] k]
move => /andP[k_gt0 k_lt3].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 1192 852 k_lt3 : k < 4
codom (u3 k) \subset [:: pa1; a[p2, pa1S] k]
24ec
rewrite !ffunE eqn_leq leqNgt k_gt0 /=.24f3 codom
(if k == 1
then tam1
else
if k == 2
then ↓[u (inord a)]
else if k == 3 then sa1 else ta1) \subset
[:: pa1; a[p2, pa1S] k]
24ec
case : eqP => [->/=|/eqP kD1].24f3 codom tam1 \subset [:: pa1; a[p2, pa1S] 1 ]
by rewrite /pa1S !apegS apeg0 codom_apeg.
case : eqP =>[->/=|/eqP kD2].2500 codom ↓[u (inord a)] \subset [:: pa1; a[p2, pa1S] 2 ]
apply : codom_liftr; rewrite codom_subC.2500 codom (u (inord a)) \subset [:: a[p2, pa1S] 2 ; pa1]
2509
have /cH : 0 < (inord a : 'I_l.+2 ) < l.+1 .
by rewrite inordK // a_gt0 /= -a1E.
by rewrite inordK // /pa1 a1E.
have ->/= : k = 3 :> nat.
by case : (k : nat) k_lt3 k_gt0 kD1 kD2 => // [] [|[|[|]]].
by rewrite /pa1S !(apegS, apeg0) codom_apeg.
have P6 :
(S_[4 ] n.+1 ).*2 <=
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove +
`d[sa1, ta1]_smove) + sp sam1 4 p2 + sp ta1 4 p2.24ee (S_[4 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove +
sp (n:=n.+1 ) sam1 4 p2 + sp (n:=n.+1 ) ta1 4 p2
apply : (leq_trans (IH _ _ _ _ _ _ cH6)); rewrite /pa1S /pa1 //.
- 2534
by rewrite eq_sym.
- 253d
by rewrite eq_sym.
- 2542
by rewrite apegS apeg_eqC.24ee sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) (u3 ord0) 4 p2 +
sp (n:=n.+1 ) (u3 ord_max) 4
( a[p2, a[p1, p3] a1.+1 ] 4 ) <=
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove +
sp (n:=n.+1 ) sam1 4 p2 + sp (n:=n.+1 ) ta1 4 p2
252f
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.24ee sd (n:=n.+1 ) u3 =
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove
- 254b
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK /= ?a1E .
- 2555
by apply : eq_bigr => i _; rewrite !ffunE /=.24ee sp (n:=n.+1 ) (u3 ord_max) 4
( a[p2, a[p1, p3] a1.+1 ] 4 ) = sp (n:=n.+1 ) ta1 4 p2
252f
by apply : eq_bigr => i _; rewrite !ffunE /= a1E.
set x3S := sp _ _ _ in P6; set y3S := sp _ _ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 24ef x3S := sp (n:=n.+1 ) sam1 4 p2 : nat
y3S := sp (n:=n.+1 ) ta1 4 p2 : nat
P6 : (S_[4 ] n.+1 ).*2 <=
`d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove +
`d[sa1, ta1]_smove + x3S + y3S
1cbb 1b50
have x2Sx3SE : x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 4 ] n.2563 x2S + x3S <= (S_[1 ] n).*2 + α_[maxn (3 * a).-2 4 ] n
by apply : sum_alpha_diffE; rewrite /pa.
rewrite (maxn_idPl _) in x2Sx3SE; last first .
by rewrite -subn2 ltn_subRL // (leq_mul2l 3 2 ).
have y2Sy3SE : y2S + y3S <= (S_[1 ] n).*2 + α_[maxn (3 * c).-2 4 ] n.2578 y2S + y3S <= (S_[1 ] n).*2 + α_[maxn (3 * c).-2 4 ] n
apply : sum_alpha_diffE => //; first by rewrite /pa1.
by rewrite codom_subC.
rewrite (maxn_idPl _) in y2Sy3SE; last first .
by rewrite -subn2 ltn_subRL (leq_mul2l 3 2 ).
rewrite (_ : sd u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove); last first .2590 sd (n:=n.+2 ) u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove
pose f i := `d[u (inord i), u (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 24ef 2564 2565 2566 1ed4 2591 1ff0
2598 2599
by rewrite /sd -!(big_mkord xpredT f) a1E -!big_cat_nat.
rewrite -{}P1 -{P3}P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 24ef 2564 2565 2566 1ed4 2591
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 + (c.*2 + sd (n:=n.+1 ) u2) +
x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1b50
rewrite (_ : sd u1 =
\sum_(i < (3 * a).-2 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove
+ `d[sam1, tam1]_smove
+ `d[tam1, ↓[u (inord a)]]_smove); last first .
pose f i := `d[u1 (inord i), u1 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 24ef 2564 2565 2566 1ed4 2591 2008
2000 25ab
rewrite /sd -!(big_mkord xpredT f) .
rewrite -{1 }(subnK (_ : 1 < 3 * a)) //; last first .
by rewrite -[a]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recr /f //=; congr (_ + _ + _).
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.
rewrite inordK; last by rewrite ltnS ltn_mul2l /= prednK.
rewrite mod3E /= eqxx.
rewrite ffunE inordK; last first .
by rewrite -[_.+3 ](mulnDr 3 1 ) add1n prednK // ltnW.
by rewrite mod3E /= eqxx.
rewrite ffunE (_ : (3 * a).-2 = (3 * (a.-1 )).+1 ); last first .
by rewrite -{1 }[a]prednK // mulnS.
rewrite inordK; last first .
by rewrite -{2 }[a]prednK // mulnS.
rewrite mod3E /= eqxx.
rewrite ffunE inordK; last first .
by rewrite -{2 }[a]prednK // mulnS.
by rewrite -[(_ * _).+3 ](mulnDr 3 1 ) mod3E /= div3E add1n prednK.25a6 (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
(c.*2 + sd (n:=n.+1 ) u2) + x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1b50
rewrite [X in _ <= _ + (_ + X) + _ + _](_ : _ =
`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 ) `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove);
last first .
pose f i := `d[u2 (inord i), u2 (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cb7 1cc0 1cc5 1cca 1e6d 1e6e 1e6f 123f 24e1 24e6 24ef 2564 2565 2566 1ed4 2591 206c
2064 25fb
rewrite /sd -!(big_mkord xpredT f) .
rewrite -{1 }(subnK (_ : 1 < 3 * c)) //; last first .
by rewrite -[c]prednK // mulnS.
rewrite subn2 !addn2 !big_nat_recl // /f /= !addnA; congr (_ + _ + _).
- 260e
rewrite !ffunE !inordK ?addn0 //=.
by rewrite ltnS muln_gt0.
- 2618
rewrite !ffunE !inordK //=.
by rewrite ltnW // ltnS (leq_mul2l 3 1 c).
by rewrite ltnS muln_gt0.
by rewrite big_mkord.25a6 (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(\sum_(i < (3 * a).-2 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove) +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove)) +
x1S +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
1b50
set z1S := \sum_(_ < _) _ in P4; set z2S := \sum_(_ < _) _ in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 2566 1ed4 2591 20a3 20b0 20a4 20b1
2629 1b50
rewrite -/z1S -/z2S.262d (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove)) +
x1S + z2S
1b50
rewrite a1E -/y1S.262d (S_[l.+1 ] n.+2 ).*2 <=
a.*2 +
(z1S + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove) +
(c.*2 +
(`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove +
y1S)) + x1S + z2S
1b50
changer (a.*2 + c.*2 + (`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove
+ `d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove)
+ x1S + y1S + z1S + z2S). 262d (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + c.*2 +
(`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove) +
x1S + y1S + z1S + z2S
1b50
set d1 := `d[_,_]_ _ + `d[_,_]_ _ + `d[_,_]_ _ + `d[_,_]_ _;
rewrite -/d1 in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 d1 := `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord a)]]_smove +
`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove : nat
P6 : (S_[4 ] n.+1 ).*2 <= d1 + x3S + y3S
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + c.*2 + d1 + x1S + y1S + z1S + z2S
1b50
have F1 := dsum_alphaL_S (3 * a).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db
2640 1b50
have F2 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0
2640 1b50
have F3 := dsum_alphaL_S 4 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 F3 : S_[4 ] n.+1 = S_[4 ] n + α_[4 ] n
2640 1b50
have F4_a : 2 * a = 2 + a.-1 + a.-1 .
by rewrite mul2n -{1 }[a]prednK // -addnn addnS.
have F4_c : 2 * c = 2 + c.-1 + c.-1 .
by rewrite mul2n -{1 }[c]prednK // -addnn addnS.
have F4 i k : 0 < i -> S_[i.-1 ] k.+1 <= S_[(3 *i).-2 ] k + i.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2100
2101
move => i_gt0; apply : leq_trans (dsum_alpha3l _ _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2100 210a
210b 2664
rewrite leq_add2r.
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[i]prednK // mulnS addSn add2n /=.
have F4an := F4 a n a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b
2640 1b50
have F4an1 := F4 a n.+1 a_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120
2640 1b50
have F4cn := F4 c n (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125
2640 1b50
have F4cn1 := F4 c n.+1 (c_gt0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a
2640 1b50
have l_gt1 : 1 < l.
by rewrite -ltnS l1E -[3 ]/(2 + 0 + 1 ); rewrite !leq_add.
have F5 := SH l_gt1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139
2640 1b50
have am1_gt0 : 0 < a.-1 by rewrite -subn1 ltn_subRL addn0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b
2640 1b50
have F6n1 : S_[1 ] n.+2 + S_[l.+1 ] n.+2 <= S_[a.-1 ] n.+2 + S_[c.+2 ] n.+2 .2694 S_[1 ] n.+2 + S_[l.+1 ] n.+2 <=
S_[a.-1 ] n.+2 + S_[c.+2 ] n.+2
rewrite addnC (_ : l.+1 = 1 + c.+1 + a.-2 ); last first .2694 l.+1 = 1 + c.+1 + a.-2
by rewrite /c add1n 2 !addSnnS !prednK ?a1E ?subnK .
rewrite {2 }(_ : a.-1 = 1 + a.-2 ); last by rewrite add1n prednK.2694 S_[1 + c.+1 + a.-2 ] n.+2 + S_[1 ] n.+2 <=
S_[1 + a.-2 ] n.+2 + S_[c.+2 ] n.+2
2699
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F6n : S_[1 ] n.+1 + S_[l] n.+1 <= S_[a.-1 ] n.+1 + S_[c.+1 ] n.+1 .269b S_[1 ] n.+1 + S_[l] n.+1 <=
S_[a.-1 ] n.+1 + S_[c.+1 ] n.+1
rewrite addnC (_ : l = 1 + c + a.-2 ); last first .
rewrite /c add1n a1E -{1 }[a]prednK // subSS.269b l = (l - a.-1 ).+1 + a.-2
26ba
by rewrite !addSnnS !prednK // subnK // -ltnS prednK.
rewrite {2 }(_ : a.-1 = 1 + a.-2 ); last by rewrite add1n prednK.269b S_[1 + c + a.-2 ] n.+1 + S_[1 ] n.+1 <=
S_[1 + a.-2 ] n.+1 + S_[c.+1 ] n.+1
26b2
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have cm1_gt0 : 0 < c.-1 by rewrite -subn1 ltn_subRL addn0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475
2640 1b50
have F7n1 : S_[1 ] n.+2 + S_[c.+2 ] n.+2 <= S_[c.-1 ] n.+2 + S_[4 ] n.+2 .26ce S_[1 ] n.+2 + S_[c.+2 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[4 ] n.+2
rewrite addnC (_ : c.+2 = 1 + 3 + c.-2 ); last first .
by rewrite add1n 2 !addSnnS !prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last by rewrite add1n prednK.26ce S_[1 + 3 + c.-2 ] n.+2 + S_[1 ] n.+2 <=
S_[1 + c.-2 ] n.+2 + S_[4 ] n.+2
26d3
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F7n : S_[1 ] n.+1 + S_[c.+1 ] n.+1 <= S_[c.-1 ] n.+1 + S_[3 ] n.+1 .26d5 S_[1 ] n.+1 + S_[c.+1 ] n.+1 <=
S_[c.-1 ] n.+1 + S_[3 ] n.+1
rewrite addnC (_ : c.+1 = 1 + 2 + c.-2 ); last first .
by rewrite add1n 2 !addSnnS !prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last by rewrite add1n prednK.26d5 S_[1 + 2 + c.-2 ] n.+1 + S_[1 ] n.+1 <=
S_[1 + c.-2 ] n.+1 + S_[3 ] n.+1
26eb
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F8 : S_[4 ] n.+2 <= S_[3 ] n.+1 + (α_[1 ] n.+1 ).*2 .26ed S_[4 ] n.+2 <= S_[3 ] n.+1 + (α_[1 ] n.+1 ).*2
by apply : dsum_alphaL_alpha n.+1 (isT : 1 < 3 ).
have F9 : S_[3 ] n.+1 <= S_[4 ] n.+1 by case : (concave_dsum_alphaL_l n.+1 ).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475 26d6 26ee 2707 F9 : S_[3 ] n.+1 <= S_[4 ] n.+1
2640 1b50
have F10n1 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475 26d6 26ee 2707 270f F10n1 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
2640 1b50
have F10n := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475 26d6 26ee 2707 270f 2714 F10n : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
2640 1b50
have F11 := bound_alphaL 2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475 26d6 26ee 2707 270f 2714 2719 F11 : α_[2 ] n <= (α_[1 ] n).*2
2640 1b50
have F12 := alphaL_1_2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 5c3 1b4f 1b57 1b60 1b65 1b6a 11fc 1cb6 1cc0 1cc5 1cca 1e6d 1e6e 123f 24e1 24e6 24ef 2564 2565 1ed4 2591 20a3 20b0 20a4 20b1 263e 263f 20db 20e0 264d 20ed 20f8 2105 211b 2120 2125 212a 4e4 2139 b2b 269c 26b5 2475 26d6 26ee 2707 270f 2714 2719 271e F12 : α_[1 ] n.+1 <= (α_[1 ] n).*2
2640 1b50
by lia .
rewrite negb_and -!leqNgt => acH.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d acH : (a <= 1 ) || (c <= 1 )
573
(* subcase a = 1 *)
have aLc : a <= c by [].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b aLc : a <= c
573
have aE1 : a = 1 .
case /orP: acH; case : (a) aLc a_gt0 => // [] [|n1] //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d n1 : nat
n1.+1 < c -> 0 < n1.+2 -> c <= 1 -> n1.+2 = 1
2735
by case : (c) => // [] [].
have leq_S4 k : 5 * S_[1 ] k.+1 + S_[1 ] k.+2 <= 6 * S_[4 ] k + 9 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e a81
5 * S_[1 ] k.+1 + S_[1 ] k.+2 <= 6 * S_[4 ] k + 9
have F3 : 4 * S_[3 ] k + 2 * S_[6 ] k <= 6 * S_[4 ] k.2744 4 * S_[3 ] k + 2 * S_[6 ] k <= 6 * S_[4 ] k
rewrite -{1 }[4 ]/(2 * 2 ) -mulnA -mulnDr -{2 }[6 ]/(2 * 3 ) -mulnA.2744 2 * (2 * S_[3 ] k + S_[6 ] k) <= 2 * (3 * S_[4 ] k)
274e
rewrite leq_mul2l /= -(leq_add2r (S_[5 ] k)).2744 2 * S_[3 ] k + S_[6 ] k + S_[5 ] k <=
3 * S_[4 ] k + S_[5 ] k
274e
changel (S_[6 ] k + S_[3 ] k + (S_[5 ] k + S_[3 ] k)). 2744 S_[6 ] k + S_[3 ] k + (S_[5 ] k + S_[3 ] k) <=
3 * S_[4 ] k + S_[5 ] k
274e
changer (S_[5 ] k + S_[4 ] k + (S_[4 ] k + S_[4 ] k)). 2744 S_[6 ] k + S_[3 ] k + (S_[5 ] k + S_[3 ] k) <=
S_[5 ] k + S_[4 ] k + (S_[4 ] k + S_[4 ] k)
274e
by apply : leq_add; apply : concaveEk1 3 _ _ (concave_dsum_alphaL_l k).
applyr F3. 2744 5 * S_[1 ] (1 + k) + S_[1 ] (2 + k) <=
9 + (4 * S_[3 ] k + 2 * S_[6 ] k)
2746
have F3k : S_[1 ] k.+1 <= S_[3 ] k + 1 by apply : dsum_alpha3l.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e a81 F3k : S_[1 ] k.+1 <= S_[3 ] k + 1
2768 2746
have F3k1 : S_[2 ] k.+1 <= S_[6 ] k + 2 by apply : dsum_alpha3l.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e a81 276d F3k1 : S_[2 ] k.+1 <= S_[6 ] k + 2
2768 2746
have F4 := leq_dsum_alpha_2l_1 k.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18d3 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e a81 276d 2772 F4 : S_[1 ] k.+1 + S_[1 ] k.+2 <= (S_[2 ] k.+1 ).*2 .+1
2768 2746
by rewrite !add1n !add2n; lia .
move : c_gt0; rewrite leq_eqVlt eq_sym => /orP[/eqP cE1|c_gt1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 cE1 : c = 1
573
(* This is 4.2.2 a = 1, b = 1 *)
move : P1 P2 P3 => P1 P2 P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d
573 2780
have l_gt0 : 0 < l by rewrite -ltnS l1E aE1 cE1 addn1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57
573 2780
have a1El : a1 = l.
by rewrite -(subKn (_ : a1 <= l.+1 )) 1 ?ltnW // -/c cE1 subSS subn0.
have [b_gt1|b_lt2]:= leqP 2 b.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 5d1
573
(* subcase b >= 2*)
rewrite (_ : sd u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove);
last first .
pose f i := `d[u (inord i), u (inord i.+1 )]_smove.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 5d1 1ff0
1fe8 27a1
rewrite /sd -!(big_mkord xpredT f).
by rewrite -!big_cat_nat //= ltnW.
rewrite !sum_beta_S // KH1 eqxx addn0 KH2 eqxx addn0.2799 (S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
279a
apply : leq_trans (leq_add (leq_add (leq_add (leq_add (leqnn _) P3)
(leqnn _)) (leqnn _)) (leqnn _)); rewrite -{P3}P1 -{}P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 + sd (n:=n.+1 ) u2) +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
279a
set x2S := sd u2; set x0S := sd u1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 x2S := sd (n:=n.+1 ) u2 : nat
x0S := sd (n:=n.+1 ) u1 : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 + x2S) +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2
279a
pose u3 := [ffun i : 'I_b.+1 => ↓[u (inord (a + i))]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc u3 := [ffun i => ↓[u (inord (a + i))]] : {ffun forall x : ordinal_finType b.+1 ,
(fun => configuration 4 n.+1 ) x}
27bd 279a
rewrite (_ : \sum_(_ <= _ < _) _ =
\sum_(i < b) `d[u3 (inord i), u3 (inord i.+1 )]_smove); last first .27c1 \sum_(a <= H < a1)
`d[↓[u (inord H)], ↓[u (inord H.+1 )]]_smove =
\sum_(i < b) `d[u3 (inord i), u3 (inord i.+1 )]_smove
rewrite -{1 }[a]add0n big_addn -/b big_mkord.27c1 \sum_(i < b)
`d[↓[u (inord (i + a))], ↓[u (inord (i + a).+1 )]]_smove =
\sum_(i < b) `d[u3 (inord i), u3 (inord i.+1 )]_smove
27c7
apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 821
`d[↓[u (inord (i + a))], ↓[u (inord (i + a).+1 )]]_smove =
`d[u3 (inord i), u3 (inord i.+1 )]_smove
27c7
by rewrite !ffunE addnC !inordK ?(addnS, ltnS) // ltnW.
pose paS := a[p1, p3] a.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f
27c9 279a
have cH3 (k : 'I_b.+1 ) :
0 < k < b -> codom (u3 k) \subset [:: p2; a[pa, paS] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 9c1
9c2
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 9c1 852 1eeb
9d0 27de
have akLl : a + k < l.+1 .
rewrite ltnS (leq_trans _ a1Ll) //.
by rewrite -(subnK aLa1) addnC leq_add2r ltnW.
rewrite !ffunE.
have /H : 0 < (inord (a + k) : 'I_l.+2 ) < l.+1 .
rewrite inordK; first by rewrite addn_gt0 a_gt0.
by rewrite ltnS ltnW.
rewrite ffunE inordK //; last by rewrite ltnS ltnW.
by rewrite /paS apegS -apegD [k + _]addnC.
pose pa1 := a[p1, p3] a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5
27c9 279a
have P3 :
(S_[b] n.+1 ).*2 <=
\sum_(i < b) `d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove +
sp ↓[u (inord a)] b pa + sp ↓[u (inord a1)] b pa1.2809 (S_[b] n.+1 ).*2 <=
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove +
sp (n:=n.+1 ) ↓[u (inord a)] b pa +
sp (n:=n.+1 ) ↓[u (inord a1)] b pa1
apply : leq_trans (IH _ _ _ _ _ _ cH3) (leq_add (leq_add _ _) _);
rewrite /pa /paS // 1 ?eq_sym //.
- 2813
by rewrite apegS apeg_eqC eq_sym.2809 sd (n:=n.+1 ) u3 <=
\sum_(i < b)
`d[↓[u (inord (a + i))], ↓[u (inord (a + i).+1 )]]_smove
- 281e
apply : leq_sum => i; rewrite !ffunE !inordK ?addnS //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 821
1f33
by rewrite ltnS.
by rewrite ltnS ltnW.
- 282d
by apply : leq_sum => i _; rewrite !ffunE addn0.
apply : leq_sum => i _; rewrite !ffunE /= [a + b]addnC subnK //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 1054
(u (inord a1) (trshift 1 i)
!= a[ a[p1, p3] a, a[p1, p3] a.+1 ] b) *
β_[n.+1 , b] i <=
(u (inord a1) (trshift 1 i) != pa1) * β_[n.+1 , b] i
280e
by rewrite apegS -apegD subnK.
set x1S := \sum_(_ < _) _ in P3; set y2S := sp _ _ _ in P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 x1S := \sum_(H < b)
`d[↓[u (inord (a + H))], ↓[
u (inord (a + H).+1 )]]_smove : nat
y2S := sp (n:=n.+1 ) ↓[u (inord a)] b pa : nat
P3 : (S_[b] n.+1 ).*2 <=
x1S + y2S + sp (n:=n.+1 ) ↓[u (inord a1)] b pa1
27c9 279a
set y3S := sp _ _ _ in P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 y3S := sp (n:=n.+1 ) ↓[u (inord a1)] b pa1 : nat
P3 : (S_[b] n.+1 ).*2 <= x1S + y2S + y3S
27c9 279a
rewrite [\sum_(_ < _) _](_ : _ = x1S); last first .2846 \sum_(H < b) `d[u3 (inord H), u3 (inord H.+1 )]_smove =
x1S
by apply : eq_bigr => i; rewrite !ffunE !inordK ?addnS // ltnS // ltnW.
set y0S := \sum_(_ < _) _ ; set y5S := \sum_(_ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 y0S := \sum_(H < n.+1 )
(↓[u ord0] H != p1) * (α_[1 ] H).*2 : nat
y5S := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) *
(α_[1 ] H).*2 : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S + (c.*2 + x2S) + y0S + y5S
279a
have cH1 (k : 'I_(3 * a).+1 ) :
0 < k < 3 * a -> codom (u1 k) \subset [:: p3; a[p1, p2] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 k : 'I_(3 * a).+1
0 < k < 3 * a ->
codom (u1 k) \subset [:: p3; a[p1, p2] k]
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 285e 852 k_ltb : k < 3 * a
codom (u1 k) \subset [:: p3; a[p1, p2] k]
2860
rewrite {2 }aE1 muln1 in k_ltb.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 285e 852 k_ltb : k < 3
2869 2860
rewrite ffunE !modn_small // !divn_small // inord_eq0 //.286d codom
(if k == 0
then ↓[u ord0]
else
if k == 1
then if k == (3 * a.-1 ).+1 then sam1 else si 0
else if k == (3 * a.-1 ).+2 then tam1 else ti 0 ) \subset
[:: p3; a[p1, p2] k]
2860
rewrite [in 3 * a.-1 ]aE1 /=.286d codom
(if k == 0
then ↓[u ord0]
else
if k == 1
then if k == (3 * 0 ).+1 then sam1 else si 0
else if k == (3 * 0 ).+2 then tam1 else ti 0 ) \subset
[:: p3; a[p1, p2] k]
2860
case : (k : nat) k_gt0 k_ltb => //= [] [|[|]] //= _ _.285d codom sam1 \subset [:: p3; a[p1, p2] 1 ]
rewrite !(apegS, apeg0).285d codom sam1 \subset [:: p3; p2]
287b
by have := sam1C; rewrite /pa aE1 apegS apeg0.
by rewrite !(apegS, apeg0) codom_subC.
have P1 :
(S_[3 * a] n.+1 ).*2 <= x0S + sp ↓[u ord0] 3 p1 + sp ↓[u (inord a)] 3 p2.2862 (S_[3 * a] n.+1 ).*2 <=
x0S + sp (n:=n.+1 ) ↓[u ord0] 3 p1 +
sp (n:=n.+1 ) ↓[u (inord a)] 3 p2
apply : leq_trans (IH _ _ _ _ _ _ cH1) (leq_add (leq_add _ _) _);
rewrite // 1 ?eq_sym //.2862 sp (n:=n.+1 ) (u1 ord0) (3 * a) p1 <=
sp (n:=n.+1 ) ↓[u ord0] 3 p1
by apply : leq_sum => i _; rewrite ffunE /= inord_eq0 // aE1 muln1.
by apply : leq_sum => i _; rewrite ffunE /= mod3E /= div3E // aE1 muln1.
have {}P1 := leq_trans P1 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leqnn _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 P1 : (S_[3 * a] n.+1 ).*2 <=
x0S +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord a)] 3 p2
2859 279a
rewrite -/y0S in P1; set y1S := sp _ _ _ in P1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 y1S := sp (n:=n.+1 ) ↓[u (inord a)] 3 p2 : nat
P1 : (S_[3 * a] n.+1 ).*2 <= x0S + y0S + y1S
2859 279a
rewrite aE1 muln1 in P1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 P1 : (S_[3 ] n.+1 ).*2 <= x0S + y0S + y1S
2859 279a
have y1Sy2SE : y1S + y2S <= (S_[1 ] n).*2 + α_[maxn 3 b] n.28ab y1S + y2S <= (S_[1 ] n).*2 + α_[maxn 3 b] n
apply : sum_alpha_diffE => //; first by rewrite /pa // eq_sym.
apply : codom_liftr.
have /cH : 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite inordK.28ab codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
codom (u (inord a)) \subset [:: p2; pa]
28b1
by rewrite /pa aE1 inordK.
have cH2 (k : 'I_(3 * c).+1 ) :
0 < k < 3 * c ->
codom (u2 k) \subset [:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 k : 'I_(3 * c).+1
0 < k < 3 * c ->
codom (u2 k) \subset
[:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] k]
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28c6 852 k_ltb : k < 3 * c
codom (u2 k) \subset
[:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] k]
28c8
rewrite {2 }cE1 muln1 in k_ltb.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28c6 852 286e
28d1 28c8
rewrite ffunE !modn_small // !divn_small // addn0.28d5 codom
(if k == 0
then ↓[u (inord a1)]
else
if k == 1
then if k == 1 then sa1 else si a1
else if k == 2 then ta1 else ti a1) \subset
[:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] k]
28c8
case : (k : nat) k_gt0 k_ltb => //= [] [|[|]] //= _ _.28c5 codom sa1 \subset
[:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] 1 ]
by rewrite !apegS apeg0 codom_apeg.
by rewrite !(apegS, apeg0) codom_subC.
have P2 :
(S_[3 * c] n.+1 ).*2 <= x2S + sp ↓[u (inord a1)] 3 p2 +
sp ↓[u ord_max] 3 (a[p3, p1] l).28ca (S_[3 * c] n.+1 ).*2 <=
x2S + sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
sp (n:=n.+1 ) ↓[u ord_max] 3 ( a[p3, p1] l)
apply : leq_trans (IH _ _ _ _ _ _ cH2) (leq_add (leq_add _ _) _);
rewrite // 1 ?eq_sym //.
- 28f0
by rewrite apegS apeg_eqC eq_sym.
- 28f9
by apply : leq_sum => i _; rewrite ffunE /= addn0 cE1 muln1.28ca sp (n:=n.+1 ) (u2 ord_max) (3 * c)
( a[p2, a[p1, p3] a1.+1 ] (3 * c)) <=
sp (n:=n.+1 ) ↓[u ord_max] 3 ( a[p3, p1] l)
28eb
apply : leq_sum => i _; rewrite ffunE /= mod3E /= div3E // cE1 muln1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 1054
(↓[u (inord (a1 + 1 ))] i != a[p2, a[p1, p3] a1.+1 ] 3 ) *
β_[n.+1 , 3 ] i <=
(↓[u ord_max] i != a[p3, p1] l) * β_[n.+1 , 3 ] i
28eb
rewrite a1El addn1 (_ : inord _ = ord_max) ?apegS //.
by apply /val_eqP; rewrite /= inordK.
have {}P2 := leq_trans P2 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb P2 : (S_[3 * c] n.+1 ).*2 <=
x2S + sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
2859 279a
rewrite -/y5S in P2; set y4S := sp _ _ _ in P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb y4S := sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 : nat
P2 : (S_[3 * c] n.+1 ).*2 <= x2S + y4S + y5S
2859 279a
have y3Sy4SE : y3S + y4S <= (S_[1 ] n).*2 + α_[maxn b 3 ] n.2914 y3S + y4S <= (S_[1 ] n).*2 + α_[maxn b 3 ] n
apply : sum_alpha_diffE; rewrite /pa /pa1 //.
apply : codom_liftr; rewrite codom_subC.
have /cH : 0 < (inord l : 'I_l.+2 ) < l.+1 by rewrite inordK // l_gt0 /=.2914 codom (u (inord l)) \subset
[:: p2; a[p1, p3] (inord l)] ->
codom (u (inord a1)) \subset [:: p2; a[p1, p3] a1]
291b
by rewrite a1El inordK.
have Eb1 : l = b.+1 .
by have := l1E; rewrite aE1 cE1 addn1 => [] [].
rewrite Eb1.2932 (S_[b.+2 ] n.+2 ).*2 <=
a.*2 + x0S + x1S + (c.*2 + x2S) + y0S + y5S
279a
have F1b := dsum_alphaL_S b n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 F1b : S_[b] n.+1 = S_[b] n + α_[b] n
293a 279a
have F1n31 : (S_[3 ] n.+1 ).+1 = S_[1 ] n.+2 .293e (S_[3 ] n.+1 ).+1 = S_[1 ] n.+2
by rewrite dsum_alpha3_S.
have F1n1 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 293f 2947 F1n1 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
293a 279a
have F1n2 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 293f 2947 294f F1n2 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
293a 279a
have b_gt0 : 0 < b by apply : leq_trans b_gt1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 293f 2947 294f 2954 f17
293a 279a
have F2n1 : S_[b.+2 ] n.+2 <= S_[b.+1 ] n.+1 + (α_[1 ] n.+1 ).*2 .2958 S_[b.+2 ] n.+2 <= S_[b.+1 ] n.+1 + (α_[1 ] n.+1 ).*2
by rewrite dsum_alphaL_alpha .
have F2n : S_[b.+1 ] n.+1 <= S_[b] n + (α_[1 ] n).*2 .295f S_[b.+1 ] n.+1 <= S_[b] n + (α_[1 ] n).*2
by rewrite dsum_alphaL_alpha.
have F3n : S_[4 ] n.+2 <= S_[3 ] n.+1 + (α_[1 ] n.+1 ).*2 .
by rewrite dsum_alphaL_alpha.
have F4n := alphaL_3E n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 293f 2947 294f 2954 f17 2960 296b 2975 F4n : α_[3 ] n = α_[1 ] n.+1
293a 279a
have F5 := leq_dsum_alpha_2l_1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28ac 28b4 28cb 2915 2916 291e 2933 293f 2947 294f 2954 f17 2960 296b 2975 297d F5 : S_[1 ] n.+1 + S_[1 ] n.+2 <= (S_[2 ] n.+1 ).*2 .+1
293a 279a
rewrite cE1 !muln1 in P1 P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28b4 28cb 2915 291e 2933 293f 2947 294f 2954 f17 2960 296b 2975 297d 2982 28ac P2 : (S_[3 ] n.+1 ).*2 <= x2S + y4S + y5S
293a 279a
rewrite maxnC in y3Sy4SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 5d1 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28b4 28cb 2915 2933 293f 2947 294f 2954 f17 2960 296b 2975 297d 2982 28ac 2987 y3Sy4SE : y3S + y4S <= (S_[1 ] n).*2 + α_[maxn 3 b] n
293a 279a
suff :
S_[b.+2 ] n.+2 + (S_[1 ] n).*2 + α_[maxn 3 b] n <=
((S_[3 ] n.+1 ).+1 ).*2 + S_[b] n.+1
by lia .298b S_[b.+2 ] n.+2 + (S_[1 ] n).*2 + α_[maxn 3 b] n <=
((S_[3 ] n.+1 ).+1 ).*2 + S_[b] n.+1
279a
move : b_gt1; rewrite leq_eqVlt => /orP[/eqP<-|b_gt2]; last first .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b57 2792 27bb 27bc 27c2 98f 27e1 1cc5 2840 2841 2847 2848 2857 2858 2863 28a6 28b4 28cb 2915 2933 293f 2947 294f 2954 f17 2960 296b 2975 297d 2982 28ac 2987 298c 10c0
2990
(* Subcase b >= 3 *)
rewrite (maxn_idPr _) //.2994 S_[b.+2 ] n.+2 + (S_[1 ] n).*2 + α_[b] n <=
((S_[3 ] n.+1 ).+1 ).*2 + S_[b] n.+1
2995
by lia .
(* Subcase b = 2*)
rewrite (maxn_idPl _) //.2997 S_[4 ] n.+2 + (S_[1 ] n).*2 + α_[3 ] n <=
((S_[3 ] n.+1 ).+1 ).*2 + S_[2 ] n.+1
279a
suff : 2 * S_[1 ] n + 2 * α_[1 ] n.+1 <= S_[1 ] n.+1 + S_[2 ] n.+1 + 1
by lia .2997 2 * S_[1 ] n + 2 * α_[1 ] n.+1 <=
S_[1 ] n.+1 + S_[2 ] n.+1 + 1
279a
have [n_gt3 |] := leqP 4 n; last first .2997 n < 4 ->
2 * S_[1 ] n + 2 * α_[1 ] n.+1 <=
S_[1 ] n.+1 + S_[2 ] n.+1 + 1
by case : n => [|[|[|[|n1]]]]; rewrite // !(alphaS_small, alpha_small).
by have F := alpha_4_3 (n_gt3); lia .
move : b_lt2; rewrite leq_eqVlt => /orP[/eqP [] bE1 | b_lt1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23
573
(* subcase b = 1 *)
pose u1l :=
[ffun i =>
if (i : 'I_5) == 0 :> nat then ↓[u ord0] else
if i == 1 :> nat then sam1 else
if i == 2 :> nat then tam1 else
if i == 3 :> nat then ↓[u (inord 1 )] else ↓[u (inord 2 )]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 u1l := [ffun i => if (i : 'I_5) == 0 :> nat
then ↓[u ord0]
else
if i == 1 :> nat
then sam1
else
if i == 2 :> nat
then tam1
else
if i == 3 :> nat
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]] : {ffun forall x : ordinal_finType 5 ,
(fun => configuration 4 n.+1 ) x}
573 29ba
have a1E2 : a1 = 2 .
by move : (cE1); rewrite /c l1E aE1 bE1 cE1; case : (a1) => // [] [|[|]].
have P1l1 : a.*2 + sd u1l <=
\sum_(i < a1) `d[u (inord i), u (inord i.+1 )]_smove.29c9 a.*2 + sd (n:=n.+1 ) u1l <=
\sum_(i < a1) `d[u (inord i), u (inord i.+1 )]_smove
rewrite /sd a1E2 !big_ord_recr /= !big_ord0 !add0n {1 }aE1.29c9 1 .*2 +
(`d[u1l (inord 0 ), u1l (inord 1 )]_smove +
`d[u1l (inord 1 ), u1l (inord 2 )]_smove +
`d[u1l (inord 2 ), u1l (inord 3 )]_smove +
`d[u1l (inord 3 ), u1l (inord 4 )]_smove) <=
`d[u (inord 0 ), u (inord 1 )]_smove +
`d[u (inord 1 ), u (inord 2 )]_smove
29d2
rewrite !ffunE /= !inordK ?aE1 //= add2n -2 !addSn leq_add //; last first .29c9 `d[↓[u (inord 1 )], ↓[u (inord 2 )]]_smove <=
`d[u (inord 1 ), u (inord 2 )]_smove
by apply /gdist_cunlift/shanoi_connect.
rewrite (inord_eq0 _ (_ : 0 = 0 )) //.29c9 (`d[↓[u ord0], sam1]_smove + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord 1 )]]_smove).+1 <
`d[u ord0, u (inord 1 )]_smove
29d2
rewrite (_ : ord0 = inord a.-1 ); last first .
by apply /val_eqP; rewrite /= inordK aE1.29c9 (`d[↓[u (inord a.-1 )], sam1]_smove +
`d[sam1, tam1]_smove + `d[tam1, ↓[u (inord 1 )]]_smove).+1 <
`d[u (inord a.-1 ), u (inord 1 )]_smove
29d2
by rewrite -[in inord 1 ]aE1 duam1ua1E /= addnA addn0.
have cH1 (k : 'I_5) :
0 < k < 4 -> codom (u1l k) \subset [:: p3; a[p1, p2] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 1192
0 < k < 4 ->
codom (u1l k) \subset [:: p3; a[p1, p2] k]
case : k => [] [|[|[|[|]]]] //= iH _; rewrite !ffunE !(apegS, apeg0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 119c
codom
(if Ordinal (n:=5 ) (m:=1 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=1 ) iH == 1
then sam1
else
if Ordinal (n:=5 ) (m:=1 ) iH == 2
then tam1
else
if Ordinal (n:=5 ) (m:=1 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p2]
- 2a00
by have := sam1C; rewrite /pa aE1.2a06 codom
(if Ordinal (n:=5 ) (m:=2 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=2 ) iH == 1
then sam1
else
if Ordinal (n:=5 ) (m:=2 ) iH == 2
then tam1
else
if Ordinal (n:=5 ) (m:=2 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p1]
- 2a0d
by rewrite codom_subC.2a09 codom
(if Ordinal (n:=5 ) (m:=3 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=5 ) (m:=3 ) iH == 1
then sam1
else
if Ordinal (n:=5 ) (m:=3 ) iH == 2
then tam1
else
if Ordinal (n:=5 ) (m:=3 ) iH == 3
then ↓[u (inord 1 )]
else ↓[u (inord 2 )]) \subset [:: p3; p2]
29fb
apply : codom_liftr; rewrite codom_subC.2a09 codom (u (inord 1 )) \subset [:: p2; p3]
29fb
have /cH: 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite inordK.2a09 codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
codom (u (inord 1 )) \subset [:: p2; p3]
29fb
by rewrite inordK.
have lE2 : l = 2 by move : l1E; rewrite aE1 bE1 cE1 => [] [].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 29fe lE2 : l = 2
573 29ba
have {cH1}P4 :
(S_[4 ] n.+1 ).*2 <= sd u1l + sp ↓[u ord0] 4 p1 +
sp ↓[u (inord a1)] 4 p1.2a24 (S_[4 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1l + sp (n:=n.+1 ) ↓[u ord0] 4 p1 +
sp (n:=n.+1 ) ↓[u (inord a1)] 4 p1
apply : leq_trans (IH _ _ _ _ _ _ cH1) _ => //.
by rewrite eq_sym.
repeat apply : leq_add => //; apply : leq_sum => i /= _; rewrite !ffunE //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 29fe 2a25 1054
(u (inord 2 ) (trshift 1 i) != a[p1, p2] 4 ) *
β_[n.+1 , 4 ] i <=
(u (inord a1) (trshift 1 i) != p1) * β_[n.+1 , 4 ] i
2a2a
by rewrite a1El -[in inord 2 ]lE2.
have {}P4 := leq_trans P4 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leqnn _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 P4 : (S_[4 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u1l +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord a1)] 4 p1
573 29ba
set x1S := sd _ in P4.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 x1S := sd (n:=n.+1 ) u1l : nat
P4 : (S_[4 ] n.+1 ).*2 <=
x1S +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord a1)] 4 p1
573 29ba
set y1S := \sum_(_ < _) _ in P4; set y2S := sp _ _ _ in P4.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 y1S := \sum_(H < n.+1 )
(↓[u ord0] H != p1) * (α_[1 ] H).*2 : nat
y2S := sp (n:=n.+1 ) ↓[u (inord a1)] 4 p1 : nat
P4 : (S_[4 ] n.+1 ).*2 <= x1S + y1S + y2S
573 29ba
have cH2 (k : 'I_(3 * c).+1 ) :
0 < k < 3 * c ->
codom (u2 k) \subset [:: a[p1, p3] a1; a[p2, a[p1, p3] a1.+1 ] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28c6
28c7
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28c6 852 28d0
28d1 2a55
rewrite {2 }cE1 muln1 in k_ltb.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28c6 852 286e
28d1 2a55
rewrite ffunE !modn_small // !divn_small // addn0.
case : (k : nat) k_gt0 k_ltb => //= [] [|[|]] //= _ _.
by rewrite a1E2.
by rewrite codom_subC.
have P5 :
(S_[3 * c] n.+1 ).*2 <= sd u2 + sp ↓[u (inord a1)] 3 p2 +
sp ↓[u ord_max] 3 (a[p3, p1] l).2a57 (S_[3 * c] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 + sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
sp (n:=n.+1 ) ↓[u ord_max] 3 ( a[p3, p1] l)
apply : leq_trans (IH _ _ _ _ _ _ cH2) (leq_add (leq_add _ _) _);
rewrite // 1 ?eq_sym //.
- 2a77
by rewrite a1E2 eq_sym.
- 2a7e
by apply : leq_sum => i _; rewrite ffunE /= addn0 cE1 muln1.
apply : leq_sum => i _; rewrite ffunE /= mod3E /= div3E // cE1 muln1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28cb 1054
2905 2a72
rewrite a1El addn1 (_ : inord _ = ord_max) ?apegS //.
by apply /val_eqP; rewrite /= inordK.
have {}P5 := leq_trans P5 (leq_add (leqnn _) (leq_sum_beta _ _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28cb P5 : (S_[3 * c] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
573 29ba
rewrite // {1 }[in 3 *c]cE1 muln1 in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28cb P5 : (S_[3 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u2 +
sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
573 29ba
set x2S := sd _ in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb P5 : (S_[3 ] n.+1 ).*2 <=
x2S + sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
573 29ba
set y3S := sp _ _ _ in P5; set y4S := \sum_(_ < _) _ in P5.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 b23 29c2 29ca 29d5 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb y3S := sp (n:=n.+1 ) ↓[u (inord a1)] 3 p2 : nat
y4S := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) *
(α_[1 ] H).*2 : nat
P5 : (S_[3 ] n.+1 ).*2 <= x2S + y3S + y4S
573 29ba
rewrite /sd -(big_mkord xpredT
(fun i => `d[u (inord i), u (inord i.+1 )]_smove)).2aa1 (S_[l.+1 ] n.+2 ).*2 <=
\sum_(0 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
29ba
rewrite (big_cat_nat _ _ _ (_ : 0 <= a1)) //=; last by apply : ltnW.2aa1 (S_[l.+1 ] n.+2 ).*2 <=
\sum_(0 <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)
29ba
rewrite big_mkord -!addnA.2aa1 (S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < a1) `d[u (inord i), u (inord i.+1 )]_smove +
(\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
(sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)))
29ba
apply : leq_trans (leq_add P1l1 (leqnn _)); rewrite -/x1S.2aa1 (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x1S +
(\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove +
(sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p3, p1] l)))
29ba
rewrite -{P1l1}P2 -/x2S {1 }lE2 !sum_beta_S //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4
(S_[3 ] n.+2 ).*2 <=
a.*2 + x1S +
(c.*2 + x2S +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
(u ord0 ord_max != p1) * α_[l.+1 ] n.+1 +
(\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) * (α_[1 ] k).*2 +
(u ord_max ord_max != a[p3, p1] l) * α_[l.+1 ] n.+1 )))
29ba
rewrite KH1 KH2 !eqxx !addn0 aE1 -/y1S -/y4S.2ab8 (S_[3 ] n.+2 ).*2 <=
1 .*2 + x1S + (c.*2 + x2S + (y1S + y4S))
29ba
have y2Sy3SE : y2S + y3S <= (S_[1 ] n).*2 + α_[4 ] n.2ab8 y2S + y3S <= (S_[1 ] n).*2 + α_[4 ] n
apply : sum_alpha_diffE => //.2ab8 codom ↓[u (inord a1)] \subset [:: p1; p2]
2ac2
apply : codom_liftr; rewrite codom_subC.2ab8 codom (u (inord a1)) \subset [:: p2; p1]
2ac2
have /cH : 0 < (inord a1 : 'I_l.+2 ) < l.+1 by rewrite inordK // a1E2 lE2.2ab8 codom (u (inord a1)) \subset
[:: p2; a[p1, p3] (inord a1)] ->
codom (u (inord a1)) \subset [:: p2; p1]
2ac2
by rewrite inordK // a1E2.
rewrite {1 }aE1 -[1 .*2 ]/2 in P1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 P1 : 2 + sd (n:=n.+1 ) u1 =
\sum_(i < a)
`d[u (inord i), u (inord i.+1 )]_smove
2abd 29ba
rewrite {1 }cE1 -[1 .*2 ]/2 .2ad8 (S_[3 ] n.+2 ).*2 <= 2 + x1S + (2 + x2S + (y1S + y4S))
29ba
have F1n4 := dsum_alphaL_S 4 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 F1n4 : S_[4 ] n.+1 = S_[4 ] n + α_[4 ] n
2add 29ba
have F1n3 : (S_[3 ] n.+2 ).+1 = S_[1 ] n.+3 .2ae1 (S_[3 ] n.+2 ).+1 = S_[1 ] n.+3
by rewrite -dsum_alpha3_S.
have F1n13 : (S_[3 ] n.+1 ).+1 = S_[1 ] n.+2 .
by rewrite -dsum_alpha3_S.
suff : (S_[1 ] n.+3 ).*2 + (S_[1 ] n).*2 <=
4 + S_[4 ] n + S_[4 ] n.+1 + (S_[1 ] n.+2 ).*2 .2af3 (S_[1 ] n.+3 ).*2 + (S_[1 ] n).*2 <=
4 + S_[4 ] n + S_[4 ] n.+1 + (S_[1 ] n.+2 ).*2 ->
(S_[3 ] n.+2 ).*2 <= 2 + x1S + (2 + x2S + (y1S + y4S))
by lia .
case : n => [|[|[|[|n1]]]]; try by rewrite !alphaS_small.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c
(S_[1 ] n1.+3 .+4 ).*2 + (S_[1 ] n1.+4 ).*2 <=
4 + S_[4 ] n1.+4 + S_[4 ] n1.+1 .+4 + (S_[1 ] n1.+2 .+4 ).*2
29ba
set m1 := n1.+3 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c m1 := n1.+3 : nat
(S_[1 ] m1.+4 ).*2 + (S_[1 ] m1.+1 ).*2 <=
4 + S_[4 ] m1.+1 + S_[4 ] m1.+2 + (S_[1 ] m1.+3 ).*2
29ba
have F := leq_S4 m1.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c 2b0b F : 5 * S_[1 ] m1.+2 + S_[1 ] m1.+3 <=
6 * S_[4 ] m1.+1 + 9
2b0c 29ba
have F1 := leq_S4 m1.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c 2b0b 2b11 F1 : 5 * S_[1 ] m1.+3 + S_[1 ] m1.+4 <=
6 * S_[4 ] m1.+2 + 9
2b0c 29ba
have F3n3 := dsum_alphaL_S 1 m1.+3 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c 2b0b 2b11 2b16 F3n3 : S_[1 ] m1.+4 = S_[1 ] m1.+3 + α_[1 ] m1.+3
2b0c 29ba
have F3n2 := dsum_alphaL_S 1 m1.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c 2b0b 2b11 2b16 2b1b F3n2 : S_[1 ] m1.+3 = S_[1 ] m1.+2 + α_[1 ] m1.+2
2b0c 29ba
have F3n1 := dsum_alphaL_S 1 m1.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1b2d 1b57 2792 b23 29c2 29ca 2a25 2a48 2a4e 2a4f 2a50 28cb 27bb 2aa2 2aa3 2aa4 2ac5 2ad9 2ae2 2aea 2af4 273c 2b0b 2b11 2b16 2b1b 2b20 F3n1 : S_[1 ] m1.+2 = S_[1 ] m1.+1 + α_[1 ] m1.+1
2b0c 29ba
have F4m1 : 12 * α_[1 ] m1.+3 <= 16 * α_[1 ] m1.+2 .2b24 12 * α_[1 ] m1.+3 <= 16 * α_[1 ] m1.+2
rewrite -[12 ]/(4 * 3 ) -mulnA.2b24 4 * (3 * α_[1 ] m1.+3 ) <= (4 * 3 ).+4 * α_[1 ] m1.+2
2b2a
rewrite -[16 ]/(4 * 4 ) -mulnA leq_mul2l /=.2b24 3 * α_[1 ] m1.+3 <= 4 * α_[1 ] m1.+2
2b2a
by rewrite alpha_4_3.
have F4m2 : 9 * α_[1 ] m1.+2 <= 12 * α_[1 ] m1.+1 .2b2c 9 * α_[1 ] m1.+2 <= 12 * α_[1 ] m1.+1
rewrite -[12 ]/(3 * 4 ) -mulnA.2b2c 9 * α_[1 ] m1.+2 <= 3 * (4 * α_[1 ] m1.+1 )
2b3d
rewrite -[9 ]/(3 * 3 ) -mulnA leq_mul2l /=.2b2c 3 * α_[1 ] m1.+2 <= 4 * α_[1 ] m1.+1
2b3d
by rewrite alpha_4_3.
by lia .
(* subcase b = 1 *)
have bE0 : b = 0 by case : (b) b_lt1 => //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 29bd 123f
573 2780
have lE1 : l = 1 by have := l1E; rewrite aE1 bE0 cE1 => [] [].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 29bd 123f lE1 : l = 1
573 2780
have a1E1 : a1 = 1 by rewrite a1El.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 29bd 123f 2b57 a1E1 : a1 = 1
573 2780
rewrite (_ : a[p3, p1] l = a[p2, p1] l); last by rewrite lE1.2b5b (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u + sp (n:=n.+2 ) (u ord0) l.+1 p1 +
sp (n:=n.+2 ) (u ord_max) l.+1 ( a[p2, p1] l)
2780
apply : (@case2 _ IH) => //.
- 2b62
by rewrite (_ : a[p1, p3] _ = a[p1, p3] 1 ).2b5b forall k : 'I_l.+2 ,
0 < k < l.+1 ->
codom (u k) \subset [:: a[p1, p3] 1 ; a[p1, p2] k]
- 2b6e
move => k hK; rewrite {3 }lE1 in hK.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 29bd 123f 2b57 2b5c 17b2 hK : 0 < k < 2
codom (u k) \subset [:: a[p1, p3] 1 ; a[p1, p2] k]
2b71
have -> : k = inord 1 .
apply /val_eqP; rewrite /= inordK //.
by case : (k : nat) hK => [] // [|].
rewrite inordK //= !(apegS, apeg0) //= codom_subC.
have := cH (inord 1 ).2b76 (0 < inord 1 < l.+1 ->
codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )]) ->
codom (u (inord 1 )) \subset [:: p2; p3]
2b71
rewrite inordK // !(apegS, apeg0).2b76 (0 < 1 < l.+1 ->
codom (u (inord 1 )) \subset [:: p2; p3]) ->
codom (u (inord 1 )) \subset [:: p2; p3]
2b71
by apply .
- 2b93
by rewrite KH2 lE1.
move => k.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 277f 1942 1a5d 1b2d 1b57 2792 29bd 123f 2b57 2b5c k : ordinal_finType l.+2
u k ldisk = a[p1, p2] k
2780
have [->|[->|->]] // : k = ord0 \/ k = (inord 1 ) \/ k = (inord 2 ).2b9d k = ord0 \/ k = inord 1 \/ k = inord 2
- 2ba1
move : k; rewrite lE1.2b5b forall k : ordinal_finType 3 ,
k = ord0 \/ k = inord 1 \/ k = inord 2
2ba4
case => [] []; first by left ; apply : val_inj => /=.2b5b forall (n : nat) (i : n.+1 < 3 ),
Ordinal (n:=3 ) (m:=n.+1 ) i = ord0 \/
Ordinal (n:=3 ) (m:=n.+1 ) i = inord 1 \/
Ordinal (n:=3 ) (m:=n.+1 ) i = inord 2
2ba4
case .2b5b forall i : 1 < 3 ,
Ordinal (n:=3 ) (m:=1 ) i = ord0 \/
Ordinal (n:=3 ) (m:=1 ) i = inord 1 \/
Ordinal (n:=3 ) (m:=1 ) i = inord 2
by right ; left ; apply : val_inj; rewrite /= inordK.
case => //.2b5b forall i : 2 < 3 ,
Ordinal (n:=3 ) (m:=2 ) i = ord0 \/
Ordinal (n:=3 ) (m:=2 ) i = inord 1 \/
Ordinal (n:=3 ) (m:=2 ) i = inord 2
2ba4
by right ; right ; apply : val_inj; rewrite /= inordK.
by rewrite -[in inord 1 ]aE1 uaLEp2 aE1 inordK.
rewrite {1 }(_ : inord 2 = ord_max); last first .
by apply /val_eqP; rewrite /= lE1 inordK.
by rewrite KH2 lE1 /= inordK.
(* This is 4.2.3 a = 1, c >= 2 *)
pose u2r := [ffun i : 'I_(3 * c).-2 .+1 => u2 (inord i.+2 )].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0
573
pose pa1 := a[p1, p3] a1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5
573
pose pa1S := a[p1, p3] a1.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca
573
have cH8 (k : 'I_(3 * c).-2 .+1 ) :
0 < k < (3 * c).-2 -> codom (u2r k) \subset [:: p2; a[pa1, pa1S] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf
1cd0
move => /andP[k_gt0 k3L3a].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9
1cda 2be3
have k2L3c : k.+2 < (3 * c).
by have := k3L3a; rewrite -{2 }subn2 ltn_subRL add2n.
rewrite !ffunE inordK ?ltnS 1 ?ltnW //.
case : eqP => [km3E0 /= |/eqP km3D0].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cee
1cef
have k3_gt0 : 0 < k.+2 %/ 3 .
case : (k: nat) k_gt0 km3E0 => // [] //= k1 _ _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 1cd9 1ce2 1be2
1be3 2c01
by rewrite (divnMDl 1 k1 (_ : 0 < 3 )).
have a1k3Ll1 : a1 + k.+2 %/ 3 < l.+1 .
move : k2L3c.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1cee 1cfc
1d10 2c0e
rewrite {1 }(divn_eq k.+2 3 ) km3E0 addn0 mulnC ltn_mul2l /= => k2L3c.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1cee 1cfc 1d15
1d07 2c0e
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 )) ; last first .
by rewrite /pa1S !addnS !apegS -apegD addnC.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + (k.+2 ) %/ 3 )) ; last first .
rewrite apegO oddD {1 }(divn_eq k.+2 3 ) !oddD oddM andbT -oddD.2c10 a[p3, p1]
(~~ (odd a1 (+) odd (k.+2 %/ 3 + k.+2 %% 3 ))) =
a[p1, p3] (a1 + k.+2 %/ 3 )
2c2b
by rewrite km3E0 addn0 -oddD -apegO.
have /H : 0 < (inord (a1 + k.+2 %/ 3 ) : 'I_l.+2 ) < l.+1 .
rewrite inordK; first by rewrite addn_gt0 a1_gt0.
by rewrite ltnS ltnW.
by rewrite ffunE inordK // ltnS ltnW.
case : eqP => [km3E1|/eqP km3D1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cf3 1d44
1d45
rewrite eqn_leq ltnNge /=.
have a1La1k : a1 < a1 + k.+2 %/3 .
by rewrite -{1 }(addn0 a1) ltn_add2l divn_gt0.
have a1k3Ll : a1 + k.+2 %/ 3 < l.+1 .
move : (ltnW k2L3c).
rewrite {1 }(divn_eq k.+2 3 ) km3E1 addn1 mulnC ltn_mul2l /=.
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 )) ; last first .
by rewrite /pa1S !addnS !apegS -apegD addnC.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + (k.+2 ) %/ 3 ).+1 ) ; last first .2c5a a[p1, p3] (a1 + k.+2 ) =
a[p1, p3] (a1 + k.+2 %/ 3 ).+1
rewrite apegS apegO {1 }(divn_eq k.+2 3 ) !oddD oddM andbT.2c5a a[p3, p1]
(~~
(odd a1 (+) (odd (k.+2 %/ 3 ) (+) odd (k.+2 %% 3 )))) =
a[p3, p1] (a1 + k.+2 %/ 3 )
2c73
by rewrite km3E1 addbT addbN -oddD -oddS -apegO apegS.
case : (sitiHb (a1 + k.+2 %/ 3 )) => // [| siH _ _]; first by rewrite a1La1k.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cf3 1d44 1d56 1d60 1d8f
2c75 2c46
by move : siH; rewrite a1Max // ltnS ltnW.
have km3E2 : k.+2 %% 3 = 2 .
by case : (_ %% _) (ltn_mod k.+2 3 ) km3D0 km3D1 => // [] [|[|]].
rewrite ifN; last by case : (k : nat) k_gt0.
have a1La1k : a1 < a1 + k.+2 %/3 .
by rewrite -{1 }(addn0 a1) ltn_add2l divn_gt0.
have a1k3Ll : a1 + k.+2 %/ 3 < l.+1 .
have : k.+2 %/ 3 * 3 < 3 * c.
rewrite ltnW //.
move : (ltnW k2L3c).
by rewrite {1 }(divn_eq k.+2 3 ) km3E2 addn2.
rewrite mulnC ltn_mul2l /=.
rewrite -(subnK (_ : a1 <= l.+1 )) ?(leq_trans a1Ll) //.
by rewrite addnC ltn_add2r -/c.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + k.+2 )) ; last first .
by rewrite !addnS /pa1S !apegS -apegD addnC.
rewrite (_ : a[_, _ ] _ = a[p1, p3] (a1 + (k.+2 ) %/ 3 )) ; last first .
rewrite apegO {1 }(divn_eq k.+2 3 ) !oddD oddM andbT.
by rewrite km3E2 addbF -oddD -apegO.
rewrite codom_subC.
case : (sitiHb (a1 + k.+2 %/ 3 )) => // [| _ tiH _]; first by rewrite a1La1k.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 1ccf 852 1cd9 1ce2 1cf3 1d49 1d9d 1d56 1d60 1ded
1de8 2be3
by move : tiH; rewrite a1Max // a1La1k ltnS ltnW.
have c_gt0 : 0 < c by rewrite ltnW.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 2be6 18d3
573
have P8 :
(S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 ) `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp ta1 (3 * c).-2 pa1 + sp ↓[u ord_max] (3 * c).-2 (a[p3, p1] l).
apply : leq_trans (IH _ _ _ _ _ _ cH8) _; rewrite /pa1 /pa1S {cH8}//.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3
1dfc
- 2cdf
by rewrite apegS apeg_eqC.
- 2ce7
by rewrite eq_sym.
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.
- 2cef
apply : eq_bigr => i _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1e1a
1e1b 2cf1
by rewrite ![u2r _]ffunE !inordK // ltnS // ltnW.
- 2cfa
apply : eq_bigr => i _; congr ((_ != _) * _).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1054
1e25 2cfc
rewrite !ffunE /= !inordK //=.
by rewrite (leq_trans (_ : 2 < (3 * 1 ).+1 )) // ltnS leq_mul2l ltnW.
apply : eq_bigr => i _; congr ((_ != _) * _).
rewrite !ffunE /= !prednK ?muln_gt0 //=; last first .
by rewrite -subn1 ltn_subRL addn0 (leq_trans (_ : _ < 3 * 1 )) //
leq_mul2l.
rewrite inordK // mod3E /= div3E addnC subnK; last first .
by apply : (leq_trans a1Ll).
by rewrite ffunE; congr (u _ _ ); apply /val_eqP; rewrite /= inordK.
rewrite /pa1 /pa1S -[RHS]apegS -(subnK (_ : a1 <= l.+1 )) // -/c.
rewrite apegS -apegD apegO -subn2 oddD oddB //.
by rewrite oddM /= addbF -oddD -apegO.
by rewrite (leq_trans (_ : _ < 3 * 1 )) // leq_mul2l //.
by rewrite ltnW.
rewrite {cH8}//.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 2cdd
573
have l_gt0 : 0 < l.
by rewrite -ltnS l1E aE1 add1n addSn ltnS addn_gt0 c_gt0 orbT.
have c3m2_gt1 : 1 < (3 * c).-2 .
by rewrite -subn2 ltn_subRL -[2 +1 ]/(3 * 1 ) ltn_mul2l.
have {}P8 := leq_trans P8 (leq_add (leq_add (leqnn _) (leqnn _))
(leq_sum_beta _ _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 P8 : (S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
sp (n:=n.+1 ) ta1 (3 * c).-2 pa1 +
\sum_(k < n.+1 )
(↓[u ord_max] k != a[p3, p1] l) *
(α_[1 ] k).*2
573
set y7S := sp _ _ _ in P8; set y8S := \sum_(_ < n.+1 ) _ in P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 1942 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1a5d 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 y7S := sp (n:=n.+1 ) ta1 (3 * c).-2 pa1 : nat
y8S := \sum_(H < n.+1 )
(↓[u ord_max] H != a[p3, p1] l) *
(α_[1 ] H).*2 : nat
P8 : (S_[(3 * c).-2 ] n.+1 ).*2 <=
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove +
y7S + y8S
573
rewrite !sum_beta_S // KH1 KH2 !eqxx !addn0 -/y8S.2d52 (S_[l.+1 ] n.+2 ).*2 <=
sd (n:=n.+2 ) u +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S
rewrite (_ : sd u =
\sum_(i < a) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove); last first .
rewrite /sd -[X in _ = X + _ + _](big_mkord xpredT
(fun i => `d[u (inord i), u (inord i.+1 )]_smove)).2d52 \sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove =
\sum_(0 <= i < a)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
\sum_(a1 <= i < l.+1 )
`d[u (inord i), u (inord i.+1 )]_smove
2d5d
by rewrite -!big_cat_nat ?big_mkord //= ltnW.
rewrite -{}P1 -{}P2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b2d 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d55
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 + sd (n:=n.+1 ) u2) +
\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S
move : P3 => P3.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d55 1b2d
2d6b
rewrite -2 !addnA.2d6f (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[u (inord i), u (inord i.+1 )]_smove +
(c.*2 + sd (n:=n.+1 ) u2 +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
apply : leq_trans (leq_add (leq_add (leqnn _) P3) (leqnn _)); rewrite {P3}//.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d55
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 + sd (n:=n.+1 ) u2 +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
have du2E : `d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove =
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove.2d77 `d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove =
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove
rewrite !big_ord_recr /= big_ord0 !ffunE !inordK //= ?addn0 //.
by rewrite ltnW // ltnS (leq_mul2l 3 1 ).
by rewrite ltnS muln_gt0.
rewrite (_ : sd u2 =
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove) +
\sum_(i < (3 * c).-2 ) `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove);
last first .
rewrite /sd du2E.2d7f \sum_(i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(i < 2 ) `d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
2d90
rewrite -!(big_mkord xpredT
(fun i => `d[u2 (inord i), u2 (inord i.+1 )]_smove)).2d7f \sum_(0 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(0 <= i < 2 )
`d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
2d90
rewrite -!(big_mkord xpredT
(fun i => `d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove)).2d7f \sum_(0 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(0 <= i < 2 )
`d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(0 <= i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove
2d90
rewrite [X in _ = _ + X] (eq_bigr
(fun i => `d[u2 (inord (i + 2 )), u2 (inord (i + 2 ).+1 )]_smove));
last by move => i_; rewrite !addn2.2d7f \sum_(0 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(0 <= i < 2 )
`d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(0 <= i < (3 * c).-2 )
`d[u2 (inord (i + 2 )), u2 (inord (i + 2 ).+1 )]_smove
2d90
rewrite -subn2.2d7f \sum_(0 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(0 <= i < 2 )
`d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(0 <= i < 3 * c - 2 )
`d[u2 (inord (i + 2 )), u2 (inord (i + 2 ).+1 )]_smove
2d90
have <- := big_addn _ _ _ xpredT
(fun i => `d[u2 (inord i), u2 (inord i.+1 )]_smove).2d7f \sum_(0 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove =
\sum_(0 <= i < 2 )
`d[u2 (inord i), u2 (inord i.+1 )]_smove +
\sum_(0 + 2 <= i < 3 * c)
`d[u2 (inord i), u2 (inord i.+1 )]_smove
2d90
rewrite -big_cat_nat //.
by rewrite ltnW // (leq_mul2l 3 1 ).2d7f (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
\sum_(i < (3 * c).-2 )
`d[u2 (inord i.+2 ), u2 (inord i.+3 )]_smove) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
set x3S := \sum_(_ < _) _ in P8; rewrite -/x3S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 x3S := \sum_(H < (3 * c).-2 )
`d[u2 (inord H.+2 ), u2 (inord H.+3 )]_smove : nat
P8 : (S_[(3 * c).-2 ] n.+1 ).*2 <= x3S + y7S + y8S
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
have [|b_gt0] := leqP b 0 ; last first .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17
2db8
(* subcase 1 <= b *)
have cH1 (k : 'I_(3 * a).+1 ) :
0 < k < 3 * a -> codom (u1 k) \subset [:: p3; a[p1, p2] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 285e
285f
move => /andP[k_gt0 k_ltb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 285e 852 2868
2869 2dc4
rewrite {2 }aE1 muln1 in k_ltb.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 285e 852 286e
2869 2dc4
rewrite ffunE !modn_small // !divn_small // inord_eq0 //.
rewrite [in 3 * a.-1 ]aE1 /=.
case : (k : nat) k_gt0 k_ltb => //= [] [|[|]] //= _ _.
rewrite apegS apeg0.
by have := sam1C; rewrite /pa aE1.
by rewrite codom_subC.
set x0S := sd u1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S +
\sum_(a <= i < a1)
`d[↓[u (inord i)], ↓[u (inord i.+1 )]]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
2dbd
have P4 :
(S_[3 * a] n.+1 ).*2 <= x0S + sp ↓[u ord0] 3 p1 +
sp ↓[u (inord a)] 3 p2.
apply : leq_trans (IH _ _ _ _ _ _ cH1) (leq_add (leq_add _ _) _);
rewrite // 1 ?eq_sym //.
by apply : leq_sum => i _; rewrite ffunE /= inord_eq0 // aE1 muln1.
by apply : leq_sum => i _; rewrite ffunE /= mod3E /= div3E // aE1 muln1.
have {}P4 := leq_trans P4 (leq_add (leq_add (leqnn _) (leq_sum_beta _ _))
(leqnn _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc P4 : (S_[3 * a] n.+1 ).*2 <=
x0S +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ↓[u (inord a)] 3 p2
2de8 2dbd
set y0S := \sum_(_ < _) _ in P4; set y1S := sp _ _ _ in P4.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 P4 : (S_[3 * a] n.+1 ).*2 <= x0S + y0S + y1S
2de8 2dbd
have [b_gt1|b_le2] := leqP 2 b.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1
2de8
(* subcase b >= 2 *)
pose u3 := [ffun i => ↓[u (inord ((i : 'I_b.+1 ) + a))]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7
2de8 2e0a
pose paS := a[p1, p3] a.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f
2de8 2e0a
have cH6 (k : 'I_b.+1 ) :
0 < k < b -> codom (u3 k) \subset [:: p2; a[pa, paS] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 9c1
9c2
move => /andP[k_gt0 kLb].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 9c1 852 kLb : k < b
9d0 2e19
have kBound : 0 < k + a < l.+1 .
rewrite (leq_trans a_gt0) ?leq_addl //=.
move : kLb; rewrite /b ltn_subRL addnC => /leq_trans-> //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 9c1 852
1a4f 2e25
by rewrite ltnW.
rewrite ffunE codom_liftr //.
have := @cH (inord (k + a)).
rewrite /pa /paS apegS -apegD /= !inordK //; last first .
by rewrite ltnW // ltnS; case /andP: kBound.
by apply .
have {cH6}P6 :
(S_[b] n.+1 ).*2 <= sd u3 + sp (u3 ord0) b pa +
sp (u3 ord_max) b (a[pa, paS] b).2e1b (S_[b] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) (u3 ord0) b pa +
sp (n:=n.+1 ) (u3 ord_max) b ( a[pa, paS] b)
apply : IH cH6 => //; try by rewrite /pa /paS // eq_sym.
by rewrite /paS apegS apeg_eqC.
set x1S := \sum_(_ <= _ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e4b x1S := \sum_(a <= H < a1)
`d[↓[u (inord H)], ↓[
u (inord H.+1 )]]_smove : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
2e0a
rewrite !ffunE (_ : sd u3 = x1S) in P6; last first .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56
sd (n:=n.+1 ) u3 = x1S
rewrite /x1S -[a]add0n big_addn -/b big_mkord.2e5b sd (n:=n.+1 ) u3 =
\sum_(i < b)
`d[↓[u (inord (i + a))], ↓[u (inord (i + a).+1 )]]_smove
2e5d
by apply : eq_bigr => i _; rewrite !ffunE !inordK ?ltnS // ltnW.
rewrite add0n subnK // in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 P6 : (S_[b] n.+1 ).*2 <=
x1S + sp (n:=n.+1 ) ↓[u (inord a)] b pa +
sp (n:=n.+1 ) ↓[u (inord a1)] b ( a[pa, paS] b)
2e57 2e0a
set y2S := sp _ _ _ in P6; set y3S := sp _ _ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 y3S := sp (n:=n.+1 ) ↓[u (inord a1)] b ( a[pa, paS] b) : nat
P6 : (S_[b] n.+1 ).*2 <= x1S + y2S + y3S
2e57 2e0a
have aLl : a <= l by apply : leq_trans aLa1 _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc
2e57 2e0a
have y1Sy2SE : y1S + y2S <= (S_[1 ] n).*2 + α_[maxn 3 b] n.
apply : sum_alpha_diffE => //; first by rewrite /pa eq_sym.
apply /codom_liftr.
have /cH : 0 < (inord a : 'I_l.+2 ) < l.+1 by rewrite inordK // a_gt0.2e76 codom (u (inord a)) \subset
[:: p2; a[p1, p3] (inord a)] ->
codom (u (inord a)) \subset [:: p2; pa]
2e7a
by rewrite inordK // aE1 /=.
pose u5 := [ffun i : 'I_3 =>
if i == 0 :> nat then ↓[u (inord a1)]
else if i == 1 :> nat then sa1 else ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71
2e57 2e0a
have cH7 (k : 'I_3) :
0 < k < 2 -> codom (u5 k) \subset [:: p1; a[p2, p3] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 994
1f76
move => /andP[k_gt0 k_lt2].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 994 852 1e8a
1f7f 2e92
rewrite !ffunE.
by have ->/= : k = 1 :> nat by case : (k : nat) k_gt0 k_lt2 => // [] [|].
have P7 :
(S_[2 ] n.+1 ).*2 <=
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove) +
sp ↓[u (inord a1)] 2 p2 + sp ta1 2 p2.
apply : (leq_trans (IH _ _ _ _ _ _ cH7)) => //.
by rewrite eq_sym.
repeat apply : leq_add; rewrite leq_eqVlt; apply /orP; left ; apply /eqP.
- 2eb0
by rewrite /sd !big_ord_recr big_ord0 !ffunE !inordK /=.
- 2eb7
by apply : eq_bigr => i _; rewrite !ffunE.
by apply : eq_bigr => i _; rewrite !ffunE.
set x2S := (`d[_, _]_ _ + `d[_, _]_ _); rewrite -/x2S in P7.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 2e95 x2S := `d[↓[u (inord a1)], sa1]_smove +
`d[sa1, ta1]_smove : nat
P7 : (S_[2 ] n.+1 ).*2 <=
x2S + sp (n:=n.+1 ) ↓[u (inord a1)] 2 p2 +
sp (n:=n.+1 ) ta1 2 p2
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S +
(c.*2 + (x2S + x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
2e0a
set y4S := sp _ _ _ in P7; set y5S := sp _ _ _ in P7.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 2e95 2ec5 y4S := sp (n:=n.+1 ) ↓[u (inord a1)] 2 p2 : nat
1fad P7 : (S_[2 ] n.+1 ).*2 <= x2S + y4S + y5S
2ec7 2e0a
have y3Sy4SE : y3S + y4S <= (S_[1 ] n).*2 + α_[maxn b 2 ] n.2ecb y3S + y4S <= (S_[1 ] n).*2 + α_[maxn b 2 ] n
apply : sum_alpha_diffE => //.
by rewrite /paS apegS -apegD apeg_neq // eq_sym.
apply : codom_liftr; rewrite codom_subC.2ecb codom (u (inord a1)) \subset [:: p2; a[pa, paS] b]
2ed2
have /cH : 0 < (inord a1 : 'I_l.+2 ) < l.+1 .
by rewrite inordK ?a1_gt0 // ltnS (leq_trans a1Ll).
rewrite inordK ?ltnS ?(leq_trans a1Ll) //.2ecb codom (u (inord a1)) \subset [:: p2; a[p1, p3] a1] ->
codom (u (inord a1)) \subset [:: p2; a[pa, paS] b]
2ed2
by rewrite /paS apegS -apegD subnK.
rewrite (maxn_idPl _) // in y3Sy4SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ecd y3Sy4SE : y3S + y4S <= (S_[1 ] n).*2 + α_[b] n
2ec7 2e0a
have y5Sy7SE : y5S + y7S <= (S_[1 ] n).*2 + α_[maxn 2 (3 * c).-2 ] n.2ef7 y5S + y7S <= (S_[1 ] n).*2 + α_[maxn 2 (3 * c).-2 ] n
by apply : sum_alpha_diffE => //; first by rewrite /pa1 eq_sym.
rewrite (maxn_idPr _) // in y5Sy7SE.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 5d1 6a7 98f 2e56 2841 2e71 2e72 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ecd 2ef8 y5Sy7SE : y5S + y7S <= (S_[1 ] n).*2 + α_[(3 * c).-2 ] n
2ec7 2e0a
rewrite -/y0S.2f07 (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S + (c.*2 + (x2S + x3S) + (y0S + y8S))
2e0a
rewrite aE1 !muln1 in P4 P6 P7 P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 P4 : (S_[3 ] n.+1 ).*2 <= x0S + y0S + y1S
2e72 2ecd 2db7 2f0c 2e0a
have F1 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 F1 : S_[(3 * c).-2 ] n.+1 =
S_[(3 * c).-2 ] n + α_[(3 * c).-2 ] n
2f0c 2e0a
have F2 i k : 0 < i -> S_[i.-1 ] k.+1 <= S_[(3 *i).-2 ] k + i.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2100
2101
move => i_gt0; apply : leq_trans (dsum_alpha3l _ _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2100 210a
210b 2f1b
rewrite leq_add2r.
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[i]prednK // mulnS addSn add2n /=.
have F2n := F2 c n c_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2f1e F2n : S_[c.-1 ] n.+1 <= S_[(3 * c).-2 ] n + c.-1
2f0c 2e0a
have F2n1 := F2 c n.+1 c_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2f1e 2f30 F2n1 : S_[c.-1 ] n.+2 <= S_[(3 * c).-2 ] n.+1 + c.-1
2f0c 2e0a
have F3 : c = c.-1 .+1 by rewrite prednK.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2f1e 2f30 2f35 F3 : c = c.-1 .+1
2f0c 2e0a
have l_gt1 : 1 < l.
by rewrite -ltnS l1E aE1 add1n addSn ltnS (leq_trans b_gt1) // leq_addr.
have F4 := SH l_gt1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2f1e 2f30 2f35 2f3a 4e4 F4 : (S_[l.+1 ] n.+2 ).*2 <=
S_[l.+1 ] n.+2 + S_[l] n.+1 + (α_[1 ] n.+1 ).*2
2f0c 2e0a
have cB1_gt0 : 0 < c.-1 by rewrite -ltnS prednK.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f16 2f1e 2f30 2f35 2f3a 4e4 2f48 cB1_gt0 : 0 < c.-1
2f0c 2e0a
have F5 : S_[l.+1 ] n.+2 + S_[1 ] n.+2 <= S_[c.-1 ] n.+2 + S_[b.+3 ] n.+2 .2f4c S_[l.+1 ] n.+2 + S_[1 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[b.+3 ] n.+2
rewrite [X in _ <= X]addnC.2f4c S_[l.+1 ] n.+2 + S_[1 ] n.+2 <=
S_[b.+3 ] n.+2 + S_[c.-1 ] n.+2
2f52
rewrite (_ : l.+1 = 1 + c.-2 + b.+2 ); last first .2f4c l.+1 = 1 + c.-2 + b.+2
by rewrite l1E aE1 !add1n -addSnnS !prednK // addnC.
rewrite (_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F6 : S_[l] n.+1 + S_[1 ] n.+1 <= S_[c.-1 ] n.+1 + S_[b.+2 ] n.+1 .2f54 S_[l] n.+1 + S_[1 ] n.+1 <=
S_[c.-1 ] n.+1 + S_[b.+2 ] n.+1
rewrite [X in _ <= X]addnC.2f54 S_[l] n.+1 + S_[1 ] n.+1 <=
S_[b.+2 ] n.+1 + S_[c.-1 ] n.+1
2f74
rewrite (_ : l = 1 + c.-2 + b.+1 ); last first .
rewrite -[l]/(l.+1 .-1 ) l1E aE1.2f54 (1 + b + c).-1 = 1 + c.-2 + b.+1
2f80
by rewrite !add1n -addSnnS !prednK // addnC addnS.
rewrite (_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
suff :
6 * S_[1 ] n + α_[b] n + α_[maxn 3 b] n + 2 * α_[1 ] n.+1 +
S_[b.+2 ] n.+1 + S_[b.+3 ] n.+2 <=
2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2 * S_[2 ] n.+1 +
S_[1 ] n.+1 + S_[1 ] n.+2 + 4
by lia .2f76 6 * S_[1 ] n + α_[b] n + α_[maxn 3 b] n +
2 * α_[1 ] n.+1 + S_[b.+2 ] n.+1 + S_[b.+3 ] n.+2 <=
2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2 * S_[2 ] n.+1 +
S_[1 ] n.+1 + S_[1 ] n.+2 + 4
2e0a
rewrite {F1 F2 F3 F4 F5 F6}.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d
2f99 2e0a
have [b_gt2|b_le3] := leqP 3 b.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0
6 * S_[1 ] n + α_[b] n + α_[b] n + 2 * α_[1 ] n.+1 +
S_[b.+2 ] n.+1 + S_[b.+3 ] n.+2 <=
2 * S_[3 ] n.+1 + 2 * S_[b] n.+1 + 2 * S_[2 ] n.+1 +
S_[1 ] n.+1 + S_[1 ] n.+2 + 4
(* subcase b >= 3 *)
have F7 := dsum_alphaL_S b n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0 F7 : S_[b] n.+1 = S_[b] n + α_[b] n
2fa2 2fa3
have F8 : S_[b.+3 ] n.+2 <= S_[b.+2 ] n.+1 + (α_[1 ] n.+1 ).*2 .2fab S_[b.+3 ] n.+2 <= S_[b.+2 ] n.+1 + (α_[1 ] n.+1 ).*2
by apply : dsum_alphaL_alpha.
have F9 : S_[b.+1 ] n.+1 <= S_[b] n + (α_[1 ] n).*2 .
by apply : dsum_alphaL_alpha.
have F10 : S_[1 ] n.+1 + S_[b.+2 ] n.+1 <= S_[b.+1 ] n.+1 + S_[2 ] n.+1 .2fbd S_[1 ] n.+1 + S_[b.+2 ] n.+1 <=
S_[b.+1 ] n.+1 + S_[2 ] n.+1
rewrite addnC -[b.+2 ]/(1 + 1 + b).2fbd S_[1 + 1 + b] n.+1 + S_[1 ] n.+1 <=
S_[b.+1 ] n.+1 + S_[2 ] n.+1
2fc6
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F11 := dsum_alpha3_S n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0 2fac 2fb4 2fbe 2fc9 F11 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1
2fa2 2fa3
have F12 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0 2fac 2fb4 2fbe 2fc9 2fd5 F12 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
2fa2 2fa3
have F13 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0 2fac 2fb4 2fbe 2fc9 2fd5 2fda F13 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
2fa2 2fa3
have F14 := alphaL_1_2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 10c0 2fac 2fb4 2fbe 2fc9 2fd5 2fda 2fdf F14 : α_[1 ] n.+1 <= (α_[1 ] n).*2
2fa2 2fa3
by lia .
(* subcase b = 2 *)
have bE2 : b = 2 .
by case : (b) b_gt1 b_le3 => // [] [|[|]].
rewrite bE2.2fee 6 * S_[1 ] n + α_[2 ] n + α_[3 ] n + 2 * α_[1 ] n.+1 +
S_[4 ] n.+1 + S_[5 ] n.+2 <=
2 * S_[3 ] n.+1 + 2 * S_[2 ] n.+1 + 2 * S_[2 ] n.+1 +
S_[1 ] n.+1 + S_[1 ] n.+2 + 4
2e0a
have F1 := dsum_alphaL_S 2 n; rewrite {1 }F1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef F1 : S_[2 ] n.+1 = S_[2 ] n + α_[2 ] n
6 * S_[1 ] n + α_[2 ] n + α_[3 ] n + 2 * α_[1 ] n.+1 +
S_[4 ] n.+1 + S_[5 ] n.+2 <=
2 * S_[3 ] n.+1 + 2 * (S_[2 ] n + α_[2 ] n) +
2 * S_[2 ] n.+1 + S_[1 ] n.+1 + S_[1 ] n.+2 + 4
2e0a
have F2 := dsum_alphaL_S 3 n; rewrite {1 }F2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb F2 : S_[3 ] n.+1 = S_[3 ] n + α_[3 ] n
6 * S_[1 ] n + α_[2 ] n + α_[3 ] n + 2 * α_[1 ] n.+1 +
S_[4 ] n.+1 + S_[5 ] n.+2 <=
2 * (S_[3 ] n + α_[3 ] n) + 2 * (S_[2 ] n + α_[2 ] n) +
2 * S_[2 ] n.+1 + S_[1 ] n.+1 + S_[1 ] n.+2 + 4
2e0a
have F3 : S_[5 ] n.+2 <= S_[4 ] n.+1 + (α_[1 ] n.+1 ).*2 .
by apply : dsum_alphaL_alpha.
have F4 : S_[4 ] n.+1 <= S_[3 ] n + (α_[1 ] n).*2 .
by apply : dsum_alphaL_alpha.
have F5 := dsum_alpha3_S n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 F5 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1
3002 2e0a
have F6 := dsum_alpha3_S n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c F6 : S_[1 ] n.+1 = (S_[3 ] n).+1
3002 2e0a
have F7 := leq_dsum_alpha_2l_1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c 3021 F7 : S_[1 ] n.+1 + S_[1 ] n.+2 <= (S_[2 ] n.+1 ).*2 .+1
3002 2e0a
have F8 := leq_dsum_alpha_2l_1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c 3021 3026 F8 : S_[1 ] n + S_[1 ] n.+1 <= (S_[2 ] n).*2 .+1
3002 2e0a
have F9 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c 3021 3026 302b F9 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
3002 2e0a
have F10 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c 3021 3026 302b 3030 F10 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
3002 2e0a
have F11 := alphaL_1_2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 5d1 6a7 98f 2e56 2841 2e71 5cc 28b4 1f71 2e95 2ec5 2ecc 1fad 2ef8 2f08 2f11 2e72 2ecd 2db7 2f30 2f35 4e4 2f4d 2fa6 2fef 2ffb 3001 3009 3014 301c 3021 3026 302b 3030 3035 F11 : α_[1 ] n.+1 <= (α_[1 ] n).*2
3002 2e0a
by lia .
(* subcase b = 1 *)
have bE1 : b = 1 .
by case : (b) b_gt0 b_le2 => // [] [|].
have a1E2 : a1 = 2 .
by move : bE1; rewrite /b aE1; case : (a1) => // [] [|[]].
pose u3 :=
[ffun i : 'I_4 =>
if i == 0 :> nat then ↓[u (inord a)] else
if i == 1 :> nat then ↓[u (inord a1)] else
if i == 2 :> nat then sa1 else ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca u3 := [ffun i => if i == 0 :> nat
then ↓[u (inord a)]
else
if i == 1 :> nat
then ↓[u (inord a1)]
else
if i == 2 :> nat then sa1 else ta1] : {ffun forall x : ordinal_finType 4 ,
(fun => configuration 4 n.+1 ) x}
2de8 2dbd
set x1S := \sum_(_ <= _ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56
2e57 2dbd
set d1 := `d[_, _]_ _ + `d[_, _]_ _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 d1 := `d[↓[u (inord a1)], sa1]_smove +
`d[sa1, ta1]_smove : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S +
(c.*2 + (d1 + x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
2dbd
rewrite -/y0S.305d (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + x1S + (c.*2 + (d1 + x3S) + (y0S + y8S))
2dbd
changer (a.*2 + x0S + c.*2 + x3S + y0S + y8S + (x1S + d1)). 305d (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + c.*2 + x3S + y0S + y8S + (x1S + d1)
2dbd
have -> : x1S + d1 = \sum_(i < 3 ) `d[u3 (inord i), u3 (inord i.+1 )]_smove.305d x1S + d1 =
\sum_(i < 3 ) `d[u3 (inord i), u3 (inord i.+1 )]_smove
rewrite /x1S aE1 a1E2 big_nat1 /d1 !big_ord_recr big_ord0 /=.305d `d[↓[u (inord 1 )], ↓[u (inord 2 )]]_smove +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove) =
0 + `d[u3 (inord 0 ), u3 (inord 1 )]_smove +
`d[u3 (inord 1 ), u3 (inord 2 )]_smove +
`d[u3 (inord 2 ), u3 (inord 3 )]_smove
306c
by rewrite !ffunE !inordK //= aE1 a1E2 add0n !addnA.
have l_gt2 : 2 < l by rewrite -ltnS l1E aE1 bE1 !add1n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e l_gt2 : 2 < l
306e 2dbd
set x6S := \sum_(_ < 3 ) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a x6S := \sum_(H < 3 )
`d[u3 (inord H), u3 (inord H.+1 )]_smove : nat
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + x0S + c.*2 + x3S + y0S + y8S + x6S
2dbd
have cH6 (k : 'I_4) :
0 < k < 3 -> codom (u3 k) \subset [:: pa1; a[pa1S, p2] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a 307f e34
0 < k < 3 ->
codom (u3 k) \subset [:: pa1; a[pa1S, p2] k]
move => /andP[k_gt0 k_lt3].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a 307f e34 852 222c
codom (u3 k) \subset [:: pa1; a[pa1S, p2] k]
3086
rewrite !ffunE eqn_leq leqNgt k_gt0 /=.308d codom
(if k == 1
then ↓[u (inord a1)]
else if k == 2 then sa1 else ta1) \subset
[:: pa1; a[pa1S, p2] k]
3086
case : eqP => [->/=|/eqP kD1].308d codom ↓[u (inord a1)] \subset [:: pa1; a[pa1S, p2] 1 ]
apply : codom_liftr; rewrite codom_subC.308d codom (u (inord a1)) \subset [:: a[pa1S, p2] 1 ; pa1]
3097
have /cH : 0 < (inord a1 : 'I_l.+2 ) < l.+1 .
by rewrite inordK a1E2 // (leq_trans l_gt2).
by rewrite inordK // a1E2 (leq_trans l_gt2) // ltnW.
have -> : k = 2 :> nat.
by case : (k : nat) k_gt0 k_lt3 kD1 => // [] [|[]].
by have := sa1C; rewrite eqxx /pa1 /pa1S !(apegS, apeg0) codom_apeg.
have P6 :
(S_[3 ] n.+1 ).*2 <= x6S + sp (u3 ord0) 3 pa1S + sp (u3 ord_max) 3 p2.3088 (S_[3 ] n.+1 ).*2 <=
x6S + sp (n:=n.+1 ) (u3 ord0) 3 pa1S +
sp (n:=n.+1 ) (u3 ord_max) 3 p2
apply : IH cH6; rewrite /pa1S /pa1 //.
by rewrite a1E2 eq_sym.
rewrite !ffunE /= in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 P6 : (S_[3 ] n.+1 ).*2 <=
x6S + sp (n:=n.+1 ) ↓[u (inord a)] 3 pa1S +
sp (n:=n.+1 ) ta1 3 p2
3080 2dbd
set y2S := sp _ _ _ in P6; set y3S := sp _ _ _ in P6.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 y2S := sp (n:=n.+1 ) ↓[u (inord a)] 3 pa1S : nat
y3S := sp (n:=n.+1 ) ta1 3 p2 : nat
P6 : (S_[3 ] n.+1 ).*2 <= x6S + y2S + y3S
3080 2dbd
have y1Sy2SE : y1S + y2S <= (S_[1 ] n).*2 + α_[3 ] n.30cd y1S + y2S <= (S_[1 ] n).*2 + α_[3 ] n
apply : sum_alpha_diffE => //; first by rewrite eq_sym /pa1S a1E2.30cd codom ↓[u (inord a)] \subset [:: p2; pa1S]
30d5
have /H : 0 < (inord a : 'I_l.+2 ) < l.+1 ; first by rewrite inordK // aE1.30cd codom (u' (inord a)) \subset
[:: p2; a[p1, p3] (inord a)] ->
codom ↓[u (inord a)] \subset [:: p2; pa1S]
30d5
by rewrite ffunE inordK // /pa1S /= aE1 a1E2.
have lEc : l = c.+1 by rewrite -[l]/l.+1 .-1 l1E aE1 bE1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 f17 2863 27bc 2857 28a6 2e05 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d0 30d8 lEc : l = c.+1
3080 2dbd
rewrite lEc.30e7 (S_[c.+2 ] n.+2 ).*2 <=
a.*2 + x0S + c.*2 + x3S + y0S + y8S + x6S
2dbd
have y3Sy7SE : y3S + y7S <= (S_[1 ] n).*2 + α_[maxn 3 (3 * c).-2 ] n.30e7 y3S + y7S <= (S_[1 ] n).*2 + α_[maxn 3 (3 * c).-2 ] n
by apply : sum_alpha_diffE => //; first by rewrite /pa1 a1E2 eq_sym.
rewrite (maxn_idPr _) in y3Sy7SE; last first .
by rewrite -subn2 ltn_subRL ltnW // (leq_mul2l 3 2 ).
move : P4 P6 P8 => P4 P6 P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2e05 30d0 2db7
30ec 2dbd
rewrite aE1 !muln1 in P4 P6 P8.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7
30ec 2dbd
have F1 := dsum_alphaL_S 3 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 F1 : S_[3 ] n.+1 = S_[3 ] n + α_[3 ] n
30ec 2dbd
have F2 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0
30ec 2dbd
have F4 k : S_[c.-1 ] k.+1 <= S_[(3 *c).-2 ] k + c.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 a81
S_[c.-1 ] k.+1 <= S_[(3 * c).-2 ] k + c.-1
apply : leq_trans (dsum_alpha3l _ _) _.3117 S_[3 * c.-1 ] k + c.-1 <= S_[(3 * c).-2 ] k + c.-1
3119
rewrite leq_add2r.3117 S_[3 * c.-1 ] k <= S_[(3 * c).-2 ] k
3119
apply : (increasingE (increasing_dsum_alphaL_l _)).3117 3 * c.-1 <= (3 * c).-2
3119
by rewrite -{2 }[c]prednK // mulnS addSn add2n /=.
have F4n := F4 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c F4n : S_[c.-1 ] n.+1 <= S_[(3 * c).-2 ] n + c.-1
30ec 2dbd
have F4n1 := F4 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 F4n1 : S_[c.-1 ] n.+2 <= S_[(3 * c).-2 ] n.+1 + c.-1
30ec 2dbd
have F5 := prednK c_gt0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 F5 : c.-1 .+1 = c
30ec 2dbd
have l_gt1 : 1 < l by rewrite lEc.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4
30ec 2dbd
have F6 : (S_[c.+2 ] n.+2 ).*2 <=
S_[c.+2 ] n.+2 + S_[c.+1 ] n.+1 + (α_[1 ] n.+1 ).*2 .313e (S_[c.+2 ] n.+2 ).*2 <=
S_[c.+2 ] n.+2 + S_[c.+1 ] n.+1 + (α_[1 ] n.+1 ).*2
by have := (SH l_gt1); rewrite lEc.
have F7 : S_[c.+2 ] n.+2 + S_[1 ] n.+2 <= S_[c.-1 ] n.+2 + S_[4 ] n.+2 .3145 S_[c.+2 ] n.+2 + S_[1 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[4 ] n.+2
rewrite (_ : c.+2 = 1 + 3 + c.-2 ); last first .
by rewrite !addSn add0n !prednK ?addn2 // -ltnS prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F8 : S_[c.+1 ] n.+1 + S_[1 ] n.+1 <= S_[c.-1 ] n.+1 + S_[3 ] n.+1 .3150 S_[c.+1 ] n.+1 + S_[1 ] n.+1 <=
S_[c.-1 ] n.+1 + S_[3 ] n.+1
rewrite (_ : c.+1 = 1 + 2 + c.-2 ); last first .
by rewrite !addSn add0n !prednK ?addn2 // -ltnS prednK.
rewrite {2 }(_ : c.-1 = 1 + c.-2 ); last first .
by rewrite add1n prednK // -ltnS prednK.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F9 : S_[4 ] n.+2 <= S_[3 ] n.+1 + (α_[1 ] n.+1 ).*2 .
by apply : dsum_alphaL_alpha.
have F10 := dsum_alpha3_S n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4 3146 3151 316c 3186 F10 : S_[1 ] n.+1 = (S_[3 ] n).+1
30ec 2dbd
have F11 := dsum_alpha3_S n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4 3146 3151 316c 3186 318e 2fd5
30ec 2dbd
have F12 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4 3146 3151 316c 3186 318e 2fd5 2fda
30ec 2dbd
have F13 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4 3146 3151 316c 3186 318e 2fd5 2fda 2fdf
30ec 2dbd
have F14 := alphaL_1_2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 f17 2863 27bc 2857 28a6 1e77 b23 29ca 3055 2e56 305e 307a 307f 3089 30ce 30cf 30d8 30e8 30ff 2f11 30d0 2db7 310f 20e0 311c 3130 3135 313a 4e4 3146 3151 316c 3186 318e 2fd5 2fda 2fdf 2fe4
30ec 2dbd
by lia .2db5 b <= 0 ->
(S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
\sum_(a <= i0 < a1)
`d[↓[u (inord i0)], ↓[u (inord i0.+1 )]]_smove +
(c.*2 +
(`d[↓[u (inord a1)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
(* subcase b = 0 *)
rewrite leqn0 => /eqP bE0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f
2db8
have a1Ea : a1 = a by rewrite -(subnK aLa1) -/b bE0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f a1Ea : a1 = a
2db8
rewrite big_geq ?a1Ea // addn0.31aa (S_[l.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
(c.*2 +
(`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
have lEc : l = c by rewrite -[l]/(l.+1 .-1 ) l1E aE1 bE0.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab lEc : l = c
31af
rewrite {1 }lEc.31b3 (S_[c.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
(c.*2 +
(`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove +
x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
set d1 := `d[_, _]_ _ + `d[_, _]_ _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 d1 := `d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove : nat
(S_[c.+1 ] n.+2 ).*2 <=
a.*2 + sd (n:=n.+1 ) u1 +
(c.*2 + (d1 + x3S) +
(\sum_(k < n.+1 ) (↓[u ord0] k != p1) * (α_[1 ] k).*2 +
y8S))
set x0S := sd _; set y0S := \sum_(_ < _) _.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857
(S_[c.+1 ] n.+2 ).*2 <=
a.*2 + x0S + (c.*2 + (d1 + x3S) + (y0S + y8S))
changer (a.*2 + c.*2 + x3S + y0S + y8S + (x0S + d1)). 31c2 (S_[c.+1 ] n.+2 ).*2 <=
a.*2 + c.*2 + x3S + y0S + y8S + (x0S + d1)
pose u3 := [ffun i : 'I_6 =>
if i == 0 :> nat then ↓[u ord0] else
if i == 1 :> nat then sam1 else
if i == 2 :> nat then tam1 else
if i == 3 :> nat then ↓[u (inord a1)] else
if i == 4 :> nat then sa1 else
ta1].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 u3 := [ffun i => if i == 0 :> nat
then ↓[u ord0]
else
if i == 1 :> nat
then sam1
else
if i == 2 :> nat
then tam1
else
if i == 3 :> nat
then ↓[u (inord a1)]
else
if i == 4 :> nat then sa1 else ta1] : {ffun forall x : ordinal_finType 6 ,
(fun => configuration 4 n.+1 ) x}
31c7
have -> : x0S + d1 = sd u3.31cb x0S + d1 = sd (n:=n.+1 ) u3
rewrite /x0S /d1 /sd.31cb \sum_(i < 3 * a)
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
(`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove) =
\sum_(i < 5 ) `d[u3 (inord i), u3 (inord i.+1 )]_smove
31d1
rewrite -(big_mkord xpredT (fun i => `d[u1 (inord i), u1 (inord i.+1 )]_ _)).31cb \sum_(0 <= i < 3 * a)
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
(`d[↓[u (inord a)], sa1]_smove + `d[sa1, ta1]_smove) =
\sum_(i < 5 ) `d[u3 (inord i), u3 (inord i.+1 )]_smove
31d1
rewrite {1 }aE1 !(big_nat1, big_nat_recr) // !big_ord_recr big_ord0
/= ?inordK //= !ffunE ?inordK ?a1Ea ?aE1 //=.31cb `d[↓[u (inord (0 %/ 3 ))], sam1]_smove +
`d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord (3 %/ 3 ))]]_smove +
(`d[↓[u (inord 1 )], sa1]_smove + `d[sa1, ta1]_smove) =
0 + `d[↓[u ord0], sam1]_smove + `d[sam1, tam1]_smove +
`d[tam1, ↓[u (inord 1 )]]_smove +
`d[↓[u (inord 1 )], sa1]_smove + `d[sa1, ta1]_smove
31d1
by rewrite add0n !addnA inord_eq0.
have cH4 (k : 'I_6) :
0 < k < 5 -> codom (u3 k) \subset [:: p3; a[p1, p2] k].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc k : 'I_6
0 < k < 5 ->
codom (u3 k) \subset [:: p3; a[p1, p2] k]
case : k => [] [|[|[|[|[]]]]] //= iH _; rewrite !ffunE !(apegS, apeg0).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc iH : 1 < 6
codom
(if Ordinal (n:=6 ) (m:=1 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=1 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=1 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=1 ) iH == 3
then ↓[u (inord a1)]
else
if Ordinal (n:=6 ) (m:=1 ) iH == 4
then sa1
else ta1) \subset [:: p3; p2]
- 31ee
by have := sam1C; rewrite /pa aE1.31f5 codom
(if Ordinal (n:=6 ) (m:=2 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=2 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=2 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=2 ) iH == 3
then ↓[u (inord a1)]
else
if Ordinal (n:=6 ) (m:=2 ) iH == 4
then sa1
else ta1) \subset [:: p3; p1]
- 3202
by rewrite codom_subC.31f9 codom
(if Ordinal (n:=6 ) (m:=3 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 3
then ↓[u (inord a1)]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 4
then sa1
else ta1) \subset [:: p3; p2]
- 3208
rewrite a1Ea aE1.31f9 codom
(if Ordinal (n:=6 ) (m:=3 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 3
then ↓[u (inord 1 )]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 4
then sa1
else ta1) \subset [:: p3; p2]
320b
- 320e
have /H : 0 < (inord 1 : 'I_l.+2 ) < l.+1 by rewrite !inordK.31f9 codom (u' (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] ->
codom
(if Ordinal (n:=6 ) (m:=3 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=3 ) iH == 3
then ↓[u (inord 1 )]
else
if Ordinal (n:=6 ) (m:=3 ) iH == 4
then sa1
else ta1) \subset [:: p3; p2]
320b
by rewrite ffunE inordK // codom_subC.31fd codom
(if Ordinal (n:=6 ) (m:=4 ) iH == 0
then ↓[u ord0]
else
if Ordinal (n:=6 ) (m:=4 ) iH == 1
then sam1
else
if Ordinal (n:=6 ) (m:=4 ) iH == 2
then tam1
else
if Ordinal (n:=6 ) (m:=4 ) iH == 3
then ↓[u (inord a1)]
else
if Ordinal (n:=6 ) (m:=4 ) iH == 4
then sa1
else ta1) \subset [:: p3; p1]
31e9
by rewrite codom_subC.
have P4 :
(S_[5 ] n.+1 ).*2 <= sd u3 + sp ↓[u ord0] 5 p1 + sp ta1 5 p2.31eb (S_[5 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) ↓[u ord0] 5 p1 +
sp (n:=n.+1 ) ta1 5 p2
apply : leq_trans (IH _ _ _ _ _ _ cH4) _ => //; first by rewrite eq_sym.31eb sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) (u3 ord0) 5 p1 +
sp (n:=n.+1 ) (u3 ord_max) 5 ( a[p1, p2] 5 ) <=
sd (n:=n.+1 ) u3 + sp (n:=n.+1 ) ↓[u ord0] 5 p1 +
sp (n:=n.+1 ) ta1 5 p2
3221
by apply : leq_add; rewrite !ffunE.
have {}P4 := leq_trans P4
(leq_add (leq_add (leqnn _) (leq_sum_beta _ _)) (leqnn _)).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec P4 : (S_[5 ] n.+1 ).*2 <=
sd (n:=n.+1 ) u3 +
\sum_(k < n.+1 )
(↓[u ord0] k != p1) * (α_[1 ] k).*2 +
sp (n:=n.+1 ) ta1 5 p2
31d3
rewrite -/y0S in P4; set y1S := sp _ _ _ in P4.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec y1S := sp (n:=n.+1 ) ta1 5 p2 : nat
P4 : (S_[5 ] n.+1 ).*2 <= sd (n:=n.+1 ) u3 + y0S + y1S
31d3
set x1S := sd _ in P4; rewrite -/x1S.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 x1S := sd (n:=n.+1 ) u3 : nat
P4 : (S_[5 ] n.+1 ).*2 <= x1S + y0S + y1S
(S_[c.+1 ] n.+2 ).*2 <=
a.*2 + c.*2 + x3S + y0S + y8S + x1S
have y1Sy7SE : y1S + y7S <= (S_[1 ] n).*2 + α_[maxn 5 (3 * c).-2 ] n.323a y1S + y7S <= (S_[1 ] n).*2 + α_[maxn 5 (3 * c).-2 ] n
apply : sum_alpha_diffE => //; first by rewrite /pa1 eq_sym.
rewrite aE1.3244 (S_[c.+1 ] n.+2 ).*2 <=
1 .*2 + c.*2 + x3S + y0S + y8S + x1S
have leq_S5 k : 2 * S_[1 ] k.+1 + S_[1 ] k.+2 <= 3 * S_[5 ] k + 6 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81
2 * S_[1 ] k.+1 + S_[1 ] k.+2 <= 3 * S_[5 ] k + 6
have F8 : S_[3 ] k + 2 * S_[6 ] k <= 3 * S_[5 ] k.3250 S_[3 ] k + 2 * S_[6 ] k <= 3 * S_[5 ] k
have X1 := concaveEk1 3 2 1 (concave_dsum_alphaL_l k).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 X1 : S_[3 + 2 + 1 ] k + S_[3 ] k <=
S_[3 + 1 ] k + S_[3 + 2 ] k
3259 325a
rewrite -[_ + 1 ]/6 -[_ + 1 ]/4 -[_ + 2 ]/5 in X1.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 X1 : S_[6 ] k + S_[3 ] k <= S_[4 ] k + S_[5 ] k
3259 325a
have X2 := concaveEk1 4 1 1 (concave_dsum_alphaL_l k).5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 3267 X2 : S_[4 + 1 + 1 ] k + S_[4 ] k <=
S_[4 + 1 ] k + S_[4 + 1 ] k
3259 325a
rewrite -[_ + 1 ]/6 -[_ + 1 ]/5 in X2.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 3267 X2 : S_[6 ] k + S_[4 ] k <= S_[5 ] k + S_[5 ] k
3259 325a
by lia .
have F3k : S_[1 ] k.+1 <= S_[3 ] k + 1 by apply : dsum_alpha3l.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 325d 276d
3251 3252
have F3k1 : S_[2 ] k.+1 <= S_[6 ] k + 2 by apply : dsum_alpha3l.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 325d 276d 2772
3251 3252
have F3k2 := leq_dsum_alpha_2l_1 k.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 a81 325d 276d 2772 F3k2 : S_[1 ] k.+1 + S_[1 ] k.+2 <= (S_[2 ] k.+1 ).*2 .+1
3251 3252
by lia .
have [c_gt2|c_lt3] := leqP 3 c.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 3255 c_gt2 : 2 < c
324c
(* Subcase c >= 3 *)
rewrite (maxn_idPr _) in y1Sy7SE; last first .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289
4 < (3 * c).-2
by rewrite -subn2 ltn_subRL (ltn_mul2l 3 2 ).
have F1 k : S_[c.-1 ] k.+1 <= S_[(3 *c).-2 ] k + c.-1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 a81
3118
apply : leq_trans (dsum_alpha3l _ _) _.
rewrite leq_add2r.
apply : (increasingE (increasing_dsum_alphaL_l _)).
by rewrite -{2 }[c]prednK // mulnS addSn add2n /=.
have F1n := F1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 F1n : S_[c.-1 ] n.+1 <= S_[(3 * c).-2 ] n + c.-1
324c 328a
have F1n1 := F1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 F1n1 : S_[c.-1 ] n.+2 <= S_[(3 * c).-2 ] n.+1 + c.-1
324c 328a
have F2 := dsum_alphaL_S (3 * c).-2 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0
324c 328a
have F3 : 2 * c = 2 + c.-1 + c.-1 .
by rewrite mul2n add2n prednK // addSnnS prednK // addnn.
have F4 : S_[c.+1 ] n.+2 <= S_[c] n.+1 + (α_[1 ] n.+1 ).*2 .32c1 S_[c.+1 ] n.+2 <= S_[c] n.+1 + (α_[1 ] n.+1 ).*2
by apply : dsum_alphaL_alpha.
have F7n1 : S_[2 ] n.+2 + S_[c.+1 ] n.+2 <= S_[c.-1 ] n.+2 + S_[4 ] n.+2 .32cc S_[2 ] n.+2 + S_[c.+1 ] n.+2 <=
S_[c.-1 ] n.+2 + S_[4 ] n.+2
rewrite addnC (_ : c.+1 = 2 + 2 + c.-2 .-1 ); last first .32cc c.+1 = 2 + 2 + c.-1 .-2
by rewrite !addSn add0n !prednK // -ltnS prednK // -subn1 ltn_subRL //.
rewrite {2 }(_ : c.-1 = 2 + c.-1 .-2 ); last first .
by rewrite !addSn add0n !prednK // -?subn2 -?subn1 ltn_subRL.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+2 ).
have F7n : S_[2 ] n.+1 + S_[c] n.+1 <= S_[c.-1 ] n.+1 + S_[3 ] n.+1 .32d7 S_[2 ] n.+1 + S_[c] n.+1 <= S_[c.-1 ] n.+1 + S_[3 ] n.+1
rewrite addnC {1 }(_ : c = 2 + 1 + c.-1 .-2 ); last first .
by rewrite !addSn add0n !prednK // -2 !ltnS !prednK // -ltnS prednK.
rewrite {2 }(_ : c.-1 = 2 + c.-1 .-2 ); last first .
by rewrite !addSn add0n !prednK // -?subn2 -?subn1 ltn_subRL.
by apply : concaveEk1 (concave_dsum_alphaL_l n.+1 ).
have F8 := leq_S5 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 F8 : 2 * S_[1 ] n.+2 + S_[1 ] n.+3 <= 3 * S_[5 ] n.+1 + 6
324c 328a
have F9 : S_[4 ] n.+2 <= S_[3 ] n.+1 + (α_[1 ] n.+1 ).*2 .
by apply : dsum_alphaL_alpha.
have F10 := dsum_alpha3_S n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 F10 : S_[1 ] n.+2 = (S_[3 ] n.+1 ).+1
324c 328a
have F11 := leq_dsum_alpha_2l_1 n.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 F11 : S_[1 ] n.+2 + S_[1 ] n.+3 <= (S_[2 ] n.+2 ).*2 .+1
324c 328a
have F12 := leq_dsum_alpha_2l_1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7
324c 328a
have F13 := dsum_alphaL_S 1 n.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7 F13 : S_[1 ] n.+3 = S_[1 ] n.+2 + α_[1 ] n.+2
324c 328a
have F14 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7 332e F14 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
324c 328a
have F15 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7 332e 3333 F15 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
324c 328a
have F16 := increasing_alphaL 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7 332e 3333 3338 F16 : α_[1 ] n.+1 <= α_[1 ] n.+2
324c 328a
suff : 8 * α_[1 ] n.+1 <= 12 * α_[1 ] n + 6 by lia .333c 8 * α_[1 ] n.+1 <= 12 * α_[1 ] n + 6
328a
case : (n) => [|[|[|[|n1]]]]; rewrite ?alpha_small //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 3289 3296 32a1 32b2 32b7 20e0 32c2 32cd 32d8 32f7 3312 3186 3320 3325 24c7 332e 3333 3338 333d 273c
8 * α_[1 ] n1.+1 .+4 <= 12 * α_[1 ] n1.+4 + 6
328a
have F17 : 3 * α_[1 ] n1.+1 .+4 <= 4 * α_[1 ] n1.+4 .3345 3 * α_[1 ] n1.+1 .+4 <= 4 * α_[1 ] n1.+4
by rewrite alpha_4_3.
by lia .
have cE2 : c = 2 by case : (c) c_gt1 c_lt3 => [|[|[|]]].5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3245 3255 328d cE2 : c = 2
324c
rewrite (maxn_idPl _) // in y1Sy7SE; last by lia .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 2db7 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 y1Sy7SE : y1S + y7S <= (S_[1 ] n).*2 + α_[5 ] n
324c
rewrite cE2 -[_.-2 ]/4 in P8 *.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e P8 : (S_[4 ] n.+1 ).*2 <= x3S + y7S + y8S
(S_[3 ] n.+2 ).*2 <= 1 .*2 + 2 .*2 + x3S + y0S + y8S + x1S
have F1 := dsum_alphaL_S 5 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 F1 : S_[5 ] n.+1 = S_[5 ] n + α_[5 ] n
3364
have F2 := dsum_alpha3_S n.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 F2 : S_[1 ] n.+3 = (S_[3 ] n.+2 ).+1
3364
have F3 := leq_S5 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e F3 : 2 * S_[1 ] n.+1 + S_[1 ] n.+2 <= 3 * S_[5 ] n + 6
3364
have F4 := leq_S5 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 F4 : 2 * S_[1 ] n.+2 + S_[1 ] n.+3 <= 3 * S_[5 ] n.+1 + 6
3364
have F5 := leq_S4 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 F5 : 5 * S_[1 ] n.+2 + S_[1 ] n.+3 <= 6 * S_[4 ] n.+1 + 9
3364
have F6 := dsum_alphaL_S 1 n.+2 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 337d F6 : S_[1 ] n.+3 = S_[1 ] n.+2 + α_[1 ] n.+2
3364
have F7 := dsum_alphaL_S 1 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 337d 3382 F7 : S_[1 ] n.+2 = S_[1 ] n.+1 + α_[1 ] n.+1
3364
have F8 := dsum_alphaL_S 1 n.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 337d 3382 3387 F8 : S_[1 ] n.+1 = S_[1 ] n + α_[1 ] n
3364
have F10 := alphaL_1_2 n.+1 .5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 337d 3382 3387 338c F10 : α_[1 ] n.+2 <= (α_[1 ] n.+1 ).*2
3364
suff : 4 * α_[1 ] n.+1 <= 6 * α_[1 ] n + 3 by lia .3390 4 * α_[1 ] n.+1 <= 6 * α_[1 ] n + 3
case : (n) => [|[|[|[|n1]]]]; rewrite ?alpha_small //.5 129 15d2 557 26f 13 1607 558 16af 16 17 14 144c 1457 15 12 559 570 1436 16b0 1628 59b 1629 166a 1672 167b 16b1 55a 561 593 5a0 5a5 5aa 1884 1895 18ae 18c4 18c9 18ce 18db 5eb 5f0 5f9 98e b8c b91 63f 191f 66a 1931 683 193a 19f8 1a0c 1a11 1a1b 1a27 1a2f 1a3c 1a41 1a49 1b3d 272b 2730 f0e 2749 1b4f 1cc0 1cc5 1cca 18d3 1b57 2d46 2d53 2d54 2d80 2db6 123f 31ab 31b4 31bd 27bc 2857 31cc 31ec 3235 323b 323c 3255 328d 3359 335e 3363 3369 336e 3373 3378 337d 3382 3387 338c 3391 273c
4 * α_[1 ] n1.+1 .+4 <= 6 * α_[1 ] n1.+4 + 3
have F9 : 3 * α_[1 ] n1.+1 .+4 <= 4 * α_[1 ] n1.+4 .
by rewrite alpha_4_3.
by lia .
Qed .
End Case3 .
Lemma main p1 p2 p3 n l (u : {ffun 'I_l.+1 -> configuration 4 n}) :
p1 != p2 -> p1 != p3 -> p2 != p3 ->
p1 != p0 -> p2 != p0 -> p3 != p0 ->
(forall k : 'I_l.+1 , 0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n).*2 <= \sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n) (u ord0 k != p1) * β_[n, l] k +
\sum_(k < n) (u ord_max k != a[p1, p3] l) * β_[n, l] k.5 24f 4ca u : {ffun 'I_l.+1 -> configuration 4 n}
p1 != p2 ->
p1 != p3 ->
p2 != p3 ->
p1 != p0 ->
p2 != p0 ->
p3 != p0 ->
(forall k : 'I_l.+1 ,
0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]) ->
(S_[l] n).*2 <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n) (u ord0 k != p1) * β_[n, l] k +
\sum_(k < n)
(u ord_max k != a[p1, p3] l) * β_[n, l] k
Proof .33a6
elim : n l p1 p2 p3 u => [|[|n] IH] l p1 p2 p3
u p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0 cH.5 557 24f u : {ffun 'I_l.+1 -> configuration 4 0 }
15 16 17 12 13 14 cH : forall k : 'I_l.+1 ,
0 < k < l ->
codom (u k) \subset [:: p2; a[p1, p3] k]
(S_[l] 0 ).*2 <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < 0 ) (u ord0 k != p1) * β_[0 , l] k +
\sum_(k < 0 )
(u ord_max k != a[p1, p3] l) * β_[0 , l] k
- 33ad
by rewrite /dsum_alphaL /conv /= dsum_alpha_0 muln0.
- 33c0
rewrite /dsum_alphaL /conv /= dsum_alpha_1 dsum_alpha_0
muln0 addn0 add0n muln1.33b5 (minn 1 .*2 l).*2 <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < 1 ) (u ord0 k != p1) * β_[1 , l] k +
\sum_(k < 1 )
(u ord_max k != a[p1, p3] l) * β_[1 , l] k
33c2
rewrite [X in _ <= _ + X + _]big_ord_recl big_ord0 /= addn0.33b5 (minn 1 .*2 l).*2 <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , l] 0 +
\sum_(k < 1 )
(u ord_max k != a[p1, p3] l) * β_[1 , l] k
33c2
rewrite [X in _ <= _ + X]big_ord_recl big_ord0 /= addn0.33b5 (minn 1 .*2 l).*2 <=
\sum_(i < l) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , l] 0 +
(u ord_max ord0 != a[p1, p3] l) * β_[1 , l] 0
33c2
have d0fE (c1 c2 : configuration 4 1 ) :
c1 != `c[p0] -> c2 != `c[p0] -> `d[c1, c2]_smove = (c1 != c2).*2 .5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 c1, c2 : configuration 4 1
c1 != `c[p0] ->
c2 != `c[p0] -> `d[c1, c2]_smove = (c1 != c2).*2
move => c1Dp0 c2Dp0.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 c1Dp0 : c1 != `c[p0]
c2Dp0 : c2 != `c[p0]
`d[c1, c2]_smove = (c1 != c2).*2
33d6
case : (gpath_connect (shanoi_connect c1 c2))
=> [] [/gpath_dist H |a [|b p]].5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df H : `d[c1, c2]_smove = size [::]
33e0
- 33e2
by rewrite H; move /eqP: H; rewrite gdist_eq0 => ->.
- 33f2
case /gpathP; rewrite /= andbT => /moveP[z].5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df 33e9 z : ordinal_finType 1
[/\ srel (n:=4 ) (c1 z) (a z),
forall d2 : ordinal_finType 1 ,
z != d2 -> c1 d2 = a d2, on_top (q:=4 ) (n:=1 ) z c1
& on_top (q:=4 ) (n:=1 ) z a] ->
a = c2 ->
`d[c1, c2]_smove = 1 ->
`d[c1, c2]_smove = (c1 != c2).*2
33f4
rewrite [z]disk1_all => [] [zH _ _ _] aE.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df 33e9 33fa zH : srel (n:=4 ) (c1 sdisk) (a sdisk)
aE : a = c2
`d[c1, c2]_smove = 1 ->
`d[c1, c2]_smove = (c1 != c2).*2
33f4
case /andP: zH => _; rewrite aE.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df 33e9 33fa 3401
c1 sdisk * c2 sdisk == 0 ->
`d[c1, c2]_smove = 1 ->
`d[c1, c2]_smove = (c1 != c2).*2
33f4
move : c1Dp0 c2Dp0; rewrite !configuration1_eq !Ival_eq /= !ffunE /=.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33e9 33fa 3401
c1 sdisk != 0 ->
c2 sdisk != 0 ->
c1 sdisk * c2 sdisk == 0 ->
`d[c1, c2]_smove = 1 ->
`d[c1, c2]_smove = (c1 sdisk != c2 sdisk).*2
33f4
by do 2 case : val.
move => /gpath_dist; case : eqP => [<-|/eqP c1Dc2]; first by rewrite gdist0.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df 33ed 33ee c1Dc2 : c1 != c2
`d[c1, c2]_smove = size [:: a, b & p] ->
`d[c1, c2]_smove = (~~ false).*2
33d6
move => H; apply /eqP; rewrite eqn_leq {2 }H /= andbT.5 33b6 557 24f 33b7 15 16 17 12 13 14 33b1 33d4 33de 33df 33ed 33ee 3414 H : `d[c1, c2]_smove = size [:: a, b & p]
`d[c1, c2]_smove <= 1 .*2
33d6
have pH : path smove c1 [::`c[p0]; c2].3419 path smove c1 [:: `c[p0]; c2]
rewrite /=; apply /and3P; split => //.
apply /moveP; exists ord0 ; split => //=.3419 srel (n:=4 ) (c1 ord0) (`c[p0] ord0)
- 342c
rewrite !ffunE; apply /andP; split ; last by rewrite muln0.
by move : c1Dp0; rewrite configuration1_eq ffunE.
- 343c
by move => i; rewrite [i]disk1_all.
- 3441
by apply /on_topP => j; rewrite [j]disk1_all.
by apply /on_topP => j; rewrite [j]disk1_all.
apply /moveP; exists ord0 ; split => //=.3419 srel (n:=4 ) (`c[p0] ord0) (c2 ord0)
- 344c
rewrite !ffunE; apply /andP; split => //.
by move : c2Dp0; rewrite configuration1_eq ffunE eq_sym.
- 345a
by move => i; rewrite [i]disk1_all.
- 345f
by apply /on_topP => j; rewrite [j]disk1_all.
by apply /on_topP => j; rewrite [j]disk1_all.
rewrite -[1 .*2 ]/(size [:: `c[p0]; c2]).3422 `d[c1, c2]_smove <= size [:: `c[p0]; c2]
33d6
by apply : gdist_path_le pH _.
case : l u cH => [|l] u cH; first by rewrite (minn_idPr _).5 33b6 24f 15 16 17 12 13 14 33d9 557 u : {ffun 'I_l.+2 -> configuration 4 1 }
559 (minn 1 .*2 l.+1 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , l.+1 ] 0 +
(u ord_max ord0 != a[p1, p3] l.+1 ) * β_[1 , l.+1 ] 0
33c2
case : l u cH => [|l] u cH.5 33b6 24f 15 16 17 12 13 14 33d9 u : {ffun 'I_2 -> configuration 4 1 }
cH : forall k : 'I_2,
0 < k < 1 ->
codom (u k) \subset [:: p2; a[p1, p3] k]
(minn 1 .*2 1 ).*2 <=
\sum_(i < 1 ) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , 1 ] 0 +
(u ord_max ord0 != a[p1, p3] 1 ) * β_[1 , 1 ] 0
rewrite (minn_idPr _) //.3478 1 .*2 <=
\sum_(i < 1 ) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , 1 ] 0 +
(u ord_max ord0 != a[p1, p3] 1 ) * β_[1 , 1 ] 0
347c
rewrite big_ord_recl big_ord0 addn0.3478 1 .*2 <=
`d[u (inord ord0), u (inord ord0.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , 1 ] 0 +
(u ord_max ord0 != a[p1, p3] 1 ) * β_[1 , 1 ] 0
347c
rewrite inord_eq0 // (_ : inord 1 = ord_max); last first .
by apply /val_eqP; rewrite /= inordK.
rewrite /beta !(apegS, apeg0) /= alphaL1E -[_ 0 ]/1 ;
do 2 case : eqP; rewrite /= ?addn0 ;
try by move => *; rewrite leq_addl.3478 u ord_max ord0 = p3 ->
u ord0 ord0 = p1 ->
1 .*2 <= `d[u ord0, u ord_max]_smove
347c
move => u1E u0E.5 33b6 24f 15 16 17 12 13 14 33d9 3479 347a u1E : u ord_max ord0 = p3
u0E : u ord0 ord0 = p1
1 .*2 <= `d[u ord0, u ord_max]_smove
347c
rewrite d0fE //.349b 1 .*2 <= (u ord0 != u ord_max).*2
- 34a0
by rewrite configuration1_eq u1E u0E p1Dp3.
- 34aa
by rewrite configuration1_eq ffunE u0E.
by rewrite configuration1_eq ffunE u1E.
rewrite (minn_idPl _) // -[_.*2 ]/4 .347e 3 <
\sum_(i < l.+2 ) `d[u (inord i), u (inord i.+1 )]_smove +
(u ord0 ord0 != p1) * β_[1 , l.+2 ] 0 +
(u ord_max ord0 != a[p1, p3] l.+2 ) * β_[1 , l.+2 ] 0
33c2
rewrite big_ord_recl big_ord_recr /=.347e 3 <
`d[u (inord 0 ), u (inord 1 )]_smove +
(\sum_(i < l)
`d[u (inord (bump 0 i)), u (inord (bump 0 i).+1 )]_smove +
`d[u (inord (bump 0 l)), u (inord (bump 0 l).+1 )]_smove) +
(u ord0 ord0 != p1) * β_[1 , l.+2 ] 0 +
(u ord_max ord0 != a[p1, p3] l.+2 ) * β_[1 , l.+2 ] 0
33c2
rewrite -!addnA addnC -!addnA (leq_trans _ (leq_addl _ _)) //.347e 3 <
`d[u (inord (bump 0 l)), u (inord (bump 0 l).+1 )]_smove +
((u ord0 ord0 != p1) * β_[1 , l.+2 ] 0 +
((u ord_max ord0 != a[p1, p3] l.+2 ) * β_[1 , l.+2 ] 0 +
`d[u (inord 0 ), u (inord 1 )]_smove))
33c2
rewrite !apegS /beta /= alphaL_0 (minn_idPl _) /bump /= ?add1n //.347e 3 <
`d[u (inord l.+1 ), u (inord l.+2 )]_smove +
((u ord0 ord0 != p1) * 2 +
((u ord_max ord0 != a[p1, p3] l) * 2 +
`d[u (inord 0 ), u (inord 1 )]_smove))
33c2
rewrite addnCA addnC !addnA -addnA -[4 ]/(2 + 2 ).347e 2 + 2 <=
`d[u (inord l.+1 ), u (inord l.+2 )]_smove +
(u ord_max ord0 != a[p1, p3] l) * 2 +
(`d[u (inord 0 ), u (inord 1 )]_smove +
(u ord0 ord0 != p1) * 2 )
33c2
apply : leq_add.347e 1 <
`d[u (inord l.+1 ), u (inord l.+2 )]_smove +
(u ord_max ord0 != a[p1, p3] l) * 2
case : eqP => /= [umE|umD]; last by rewrite leq_addl.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 umE : u ord_max ord0 = a[p1, p3] l
1 < `d[u (inord l.+1 ), u (inord l.+2 )]_smove + 0 * 2
34cc
rewrite addn0 d0fE.34d2 1 < (u (inord l.+1 ) != u (inord l.+2 )).*2
- 34d6
case : eqP => // H.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 34d3 H : u (inord l.+1 ) = u (inord l.+2 )
1 < (~~ true).*2
34d9
have /cH : 0 < (inord l.+1 : 'I_l.+3 ) < l.+2 by rewrite inordK /=.34e2 codom (u (inord l.+1 )) \subset
[:: p2; a[p1, p3] (inord l.+1 )] -> 1 < (~~ true).*2
34d9
move => /subsetP/(_ _ (codom_f _ sdisk)).34e2 u (inord l.+1 ) sdisk
\in [:: p2; a[p1, p3] (inord l.+1 )] ->
1 < (~~ true).*2
34d9
rewrite H (_ : inord l.+2 = ord_max).34e2 u ord_max sdisk \in [:: p2; a[p1, p3] (inord l.+1 )] ->
1 < (~~ true).*2
rewrite umE inordK // apegS //= !inE.34e2 ( a[p1, p3] l == p2) || ( a[p1, p3] l == a[p3, p1] l) ->
1 < 0 .*2
34f1
rewrite (apeg_eqC _ _ _) // (negPf (apeg_neq _ _ _)) //=.
by rewrite (negPf p1Dp3).
by rewrite eq_sym.
by apply /val_eqP; rewrite /= inordK.
- 3505
rewrite configuration1_eq ffunE.34d2 u (inord l.+1 ) sdisk != p0
3507
case : (_ =P _) => // H.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 34d3 H : u (inord l.+1 ) sdisk = p0
131a 3507
have /cH : 0 < (inord l.+1 : 'I_l.+3 ) < l.+2 by rewrite inordK /=.3510 codom (u (inord l.+1 )) \subset
[:: p2; a[p1, p3] (inord l.+1 )] -> ~~ true
3507
move => /subsetP/(_ _ (codom_f _ sdisk)).3510 u (inord l.+1 ) sdisk
\in [:: p2; a[p1, p3] (inord l.+1 )] -> ~~ true
3507
by rewrite H !inE eq_sym (negPf p2Dp0) /= eq_sym (negPf (apeg_neq _ _ _)).
rewrite configuration1_eq ffunE.34d2 u (inord l.+2 ) sdisk != p0
34cc
rewrite (_ : inord l.+2 = ord_max).34d2 u ord_max sdisk != p0
by rewrite umE apeg_neq.
by apply /val_eqP; rewrite /= inordK.
case : eqP => /= [u0E|u0D]; last by rewrite leq_addl.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 349d
1 < `d[u (inord 0 ), u (inord 1 )]_smove + 0 * 2
33c2
rewrite addn0 d0fE.3530 1 < (u (inord 0 ) != u (inord 1 )).*2
- 3533
case : eqP => // H.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 349d H : u (inord 0 ) = u (inord 1 )
34e4 3536
have /cH : 0 < (inord 1 : 'I_l.+3 ) < l.+2 by rewrite inordK /=.353f codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] -> 1 < (~~ true).*2
3536
move => /subsetP/(_ _ (codom_f _ sdisk)).353f u (inord 1 ) sdisk \in [:: p2; a[p1, p3] (inord 1 )] ->
1 < (~~ true).*2
3536
rewrite -H inord_eq0 // u0E inordK //= !(apegS, apeg0).353f p1 \in [:: p2; p3] -> 1 < 0 .*2
3536
by rewrite !inE (negPf p1Dp2) (negPf p1Dp3).
- 354e
by rewrite configuration1_eq ffunE inord_eq0 // u0E.
rewrite configuration1_eq ffunE.3530 u (inord 1 ) sdisk != p0
33c2
case : eqP => // H.5 33b6 24f 15 16 17 12 13 14 33d9 557 347f 3480 349d H : u (inord 1 ) sdisk = p0
131a 33c2
have /cH : 0 < (inord 1 : 'I_l.+3 ) < l.+2 by rewrite inordK /=.355c codom (u (inord 1 )) \subset
[:: p2; a[p1, p3] (inord 1 )] -> ~~ true
33c2
move => /subsetP/(_ _ (codom_f _ sdisk)).355c u (inord 1 ) sdisk \in [:: p2; a[p1, p3] (inord 1 )] ->
~~ true
33c2
by rewrite H !inE eq_sym (negPf p2Dp0) /= eq_sym (negPf (apeg_neq _ _ _)).
case : l u cH => [|l] u cH; first by rewrite S0E.5 129 33bb 24f 15 16 17 12 13 14 557 558 559
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p1, p3] l.+1 ) * β_[n.+2 , l.+1 ] k
rewrite apegS.356c (S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
pose u' : {ffun 'I_l.+2 -> configuration 4 n.+1 } :=
[ffun i : 'I_l.+2 => ↓[u i]].5 129 33bb 24f 15 16 17 12 13 14 557 558 559 u' := [ffun i => ↓[u i]]
: {ffun 'I_l.+2 -> configuration 4 n.+1 } : {ffun 'I_l.+2 -> configuration 4 n.+1 }
3571
have H (k : 'I_l.+2 ) :
0 < k < l.+1 -> codom (u' k) \subset [:: p2; a[p1, p3] k].5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 17b2
0 < k < l.+1 ->
codom (u' k) \subset [:: p2; a[p1, p3] k]
by move => k1; rewrite ffunE; apply /codom_liftr/cH.
pose K := (u ord0 ord_max != p1) +
(u ord_max ord_max != a[p3, p1] l).5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 K := (u ord0 ord_max != p1) +
(u ord_max ord_max != a[p3, p1] l) : nat
3571
have [HK|] := boolP ((K == 2 ) || ((K == 1 ) && (l == 0 ))).5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 HK : (K == 2 ) || (K == 1 ) && (l == 0 )
3571
rewrite dsum_alphaL_S doubleD.358a (S_[l.+1 ] n.+1 ).*2 + (α_[l.+1 ] n.+1 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
358c
have IH' := IH _ p1 p2 p3 u'
p1Dp2 p1Dp3 p2Dp3 p1Dp0 p2Dp0 p3Dp0 H.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b IH' : (S_[l.+1 ] n.+1 ).*2 <=
\sum_(i < l.+1 )
`d[u' (inord i), u' (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(u' ord0 k != p1) * β_[n.+1 , l.+1 ] k +
\sum_(k < n.+1 )
(u' ord_max k != a[p1, p3] l.+1 ) *
β_[n.+1 , l.+1 ] k
3592 358c
rewrite apegS in IH'.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b IH' : (S_[l.+1 ] n.+1 ).*2 <=
\sum_(i < l.+1 )
`d[u' (inord i), u' (inord i.+1 )]_smove +
\sum_(k < n.+1 )
(u' ord0 k != p1) * β_[n.+1 , l.+1 ] k +
\sum_(k < n.+1 )
(u' ord_max k != a[p3, p1] l) *
β_[n.+1 , l.+1 ] k
3592 358c
rewrite ![\sum_(_ < _.+2 ) _]big_ord_recr /=.359b (S_[l.+1 ] n.+1 ).*2 + (α_[l.+1 ] n.+1 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
(\sum_(i < n.+1 )
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= p1) * β_[n.+2 , l.+1 ] i +
(u ord0 ord_max != p1) * β_[n.+2 , l.+1 ] n.+1 ) +
(\sum_(i < n.+1 )
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] i +
(u ord_max ord_max != a[p3, p1] l) *
β_[n.+2 , l.+1 ] n.+1 )
358c
set u1 := \sum_ (_ < _) _; set u2 := \sum_ (_ < _) _; set u3 := \sum_ (_ < _) _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b 359c u1 := \sum_(H < l.+1 )
`d[u (inord H), u (inord H.+1 )]_smove : nat
u2 := \sum_(H < n.+1 )
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) H)
!= p1) * β_[n.+2 , l.+1 ] H : nat
u3 := \sum_(H < n.+1 )
(u ord_max
(widen_ord (m:=n.+2 ) (leqnSn n.+1 ) H)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] H : nat
(S_[l.+1 ] n.+1 ).*2 + (α_[l.+1 ] n.+1 ).*2 <=
u1 +
(u2 + (u ord0 ord_max != p1) * β_[n.+2 , l.+1 ] n.+1 ) +
(u3 +
(u ord_max ord_max != a[p3, p1] l) *
β_[n.+2 , l.+1 ] n.+1 )
358c
rewrite -!addnA [_ + (u3 + _)]addnCA 2 !addnA.35a4 (S_[l.+1 ] n.+1 ).*2 + (α_[l.+1 ] n.+1 ).*2 <=
u1 + u2 + u3 +
((u ord0 ord_max != p1) * β_[n.+2 , l.+1 ] n.+1 +
(u ord_max ord_max != a[p3, p1] l) *
β_[n.+2 , l.+1 ] n.+1 )
358c
apply : leq_add.35a4 (S_[l.+1 ] n.+1 ).*2 <= u1 + u2 + u3
apply : leq_trans IH' _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b 35a5 35a6 35a7
\sum_(i < l.+1 )
`d[u' (inord i), u' (inord i.+1 )]_smove +
\sum_(k < n.+1 ) (u' ord0 k != p1) * β_[n.+1 , l.+1 ] k +
\sum_(k < n.+1 )
(u' ord_max k != a[p3, p1] l) * β_[n.+1 , l.+1 ] k <=
u1 + u2 + u3
35b1
apply : leq_add; last first .35b7 \sum_(k < n.+1 )
(u' ord_max k != a[p3, p1] l) * β_[n.+1 , l.+1 ] k <=
u3
apply : leq_sum => i _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b 35a5 35a6 35a7 1054
(u' ord_max i != a[p3, p1] l) * β_[n.+1 , l.+1 ] i <=
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l) * β_[n.+2 , l.+1 ] i
35bd
apply : leq_mul.35c3 (u' ord_max i != a[p3, p1] l) <=
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l)
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.35c3 (u' ord_max i != a[p3, p1] l) =
(u ord_max (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i)
!= a[p3, p1] l)
35c9
by rewrite !ffunE; congr (u _ _ != _); apply /val_eqP.
rewrite {2 }/beta eqn_leq [_ <= i]leqNgt ltn_ord !andbF /=.35c3 β_[n.+1 , l.+1 ] i <= (α_[1 ] i).*2
35bd
apply : geq_beta.
apply : leq_add; last first .35b7 \sum_(k < n.+1 ) (u' ord0 k != p1) * β_[n.+1 , l.+1 ] k <=
u2
apply : leq_sum => i _.35c3 (u' ord0 i != p1) * β_[n.+1 , l.+1 ] i <=
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1) *
β_[n.+2 , l.+1 ] i
35de
apply : leq_mul.35c3 (u' ord0 i != p1) <=
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1)
rewrite leq_eqVlt; apply /orP; left ; apply /eqP.35c3 (u' ord0 i != p1) =
(u ord0 (widen_ord (m:=n.+2 ) (leqnSn n.+1 ) i) != p1)
35e9
by rewrite !ffunE; congr (u _ _ != _); apply /val_eqP.
rewrite {2 }/beta eqn_leq [_ <= i]leqNgt ltn_ord !andbF /=.
apply : geq_beta.
apply : leq_sum => i _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 358b 35a5 35a6 35a7 i : ordinal_finType l.+1
`d[u' (inord i), u' (inord i.+1 )]_smove <=
`d[u (inord i), u (inord i.+1 )]_smove
35b1
rewrite !ffunE.
by apply /gdist_cunlift/shanoi_connect.
rewrite -mulnDl -/K.35a4 (α_[l.+1 ] n.+1 ).*2 <= K * β_[n.+2 , l.+1 ] n.+1
358c
case /orP: HK => [/eqP->|/andP[/eqP-> /eqP->]].5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 359c 35a5 35a6 35a7
(α_[l.+1 ] n.+1 ).*2 <= 2 * β_[n.+2 , l.+1 ] n.+1
by rewrite mul2n leq_double leq_beta.
by rewrite mul1n /beta /= /alphaL /delta !S1E.
rewrite negb_or negb_and.3585 (K != 2 ) && ((K != 1 ) || (l != 0 )) ->
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i0 < l.+1 )
`d[u (inord i0), u (inord i0.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
have : K <= 2 by rewrite /K; do 2 case : (_ != _).3585 K <= 2 ->
(K != 2 ) && ((K != 1 ) || (l != 0 )) ->
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i0 < l.+1 )
`d[u (inord i0), u (inord i0.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
case : ltngtP; rewrite // ltnS.3585 K <= 1 ->
true ->
~~ false && ((K != 1 ) || (l != 0 )) ->
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i1 < l.+1 )
`d[u (inord i1), u (inord i1.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
case : ltngtP => //= KE _ _ l_gt0; last first .5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 KE : K = 1
572 3571
move : KE; rewrite /K.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572
(u ord0 ord_max != p1) +
(u ord_max ord_max != a[p3, p1] l) = 1 ->
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
3624
(case : eqP => [KH1|/eqP KH1] /=; case : eqP) => // [/eqP KH2|KH2] _. 5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 570 571
3571
by apply : (@case1 _ IH) cH KH1 KH2 l_gt0.
pose u1 : {ffun 'I_l.+2 -> configuration 4 n.+2 } :=
[ffun i : 'I_l.+2 => u (inord (l.+1 - i))].5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca
3571 3624
have -> : \sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < l.+1 ) `d[u1 (inord i), u1 (inord i.+1 )]_smove.363c \sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove =
\sum_(i < l.+1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove
have F : injective (fun i : 'I_l.+1 => (inord (l - i) : 'I_l.+1 )).
move => i j /val_eqP.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16de
16df 3647
have lBiLl (i1 : 'I_l.+1 ) : l - i1 < l.+1 .5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16e4
16e5
by rewrite ltn_subLR ?leq_addl // -ltnS.
rewrite /= !inordK // => /eqP liE; apply /val_eqP => /=.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16de 16e9 16f1
16f2 3647
rewrite -(subKn (_ : i <= l)); last by rewrite -ltnS.
by rewrite liE subKn // -ltnS.
rewrite (reindex_inj F) /=.3649 \sum_(j < l.+1 )
`d[u (inord (inord (l - j))), u
(inord
(inord (l - j)).+1 )]_smove =
\sum_(i < l.+1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove
3641
apply : eq_bigr => i _; rewrite !ffunE.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16d9 14c4
1702 3641
have iLl2 : i < l.+2 by apply : leq_trans (ltn_ord _) _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16d9 14c4 1707
1702 3641
have lBiLl : l - i < l.+1 by rewrite ltn_subLR ?leq_addl // -ltnS.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16d9 14c4 1707 170c
1702 3641
have iLl : i <= l by rewrite -ltnS.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 16d9 14c4 1707 170c 1711
1702 3641
rewrite gdistC; last by apply /move_sym/ssym.
congr (`d[u _,u _]_smove).
by apply /val_eqP; rewrite /= !inordK ?subSn .
by apply /val_eqP; rewrite /= !inordK // ?subSS ltnS // ltnW.
pose p1' := a[p3, p1] l.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca p1' := a[p3, p1] l : peg 4
3643 3624
pose p3' := a[p1, p3] l.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 3688 p3' := a[p1, p3] l : peg 4
3643 3624
have -> : \sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k =
\sum_(k < n.+2 ) (u1 ord_max k != a[p1', p3'] l.+1 ) *
β_[n.+2 , l.+1 ] k.368c \sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k =
\sum_(k < n.+2 )
(u1 ord_max k != a[p1', p3'] l.+1 ) *
β_[n.+2 , l.+1 ] k
apply : eq_bigr => i _; congr (_ * _).5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 3688 368d 1734
(u ord0 i != p1) = (u1 ord_max i != a[p1', p3'] l.+1 )
3692
rewrite ffunE subnn.3698 (u ord0 i != p1) =
(u (inord 0 ) i != a[p1', p3'] l.+1 )
3692
by rewrite inord_eq0 // -apegD addSn addnn apegS apeg_double.
have -> : \sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k =
\sum_(k < n.+2 ) (u1 ord0 k != p1') * β_[n.+2 , l.+1 ] k.368c \sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k =
\sum_(k < n.+2 ) (u1 ord0 k != p1') * β_[n.+2 , l.+1 ] k
apply : eq_bigr => i _; congr (_ * _).3698 (u ord_max i != a[p3, p1] l) = (u1 ord0 i != p1')
36a5
rewrite ffunE subn0.3698 (u ord_max i != a[p3, p1] l) =
(u (inord l.+1 ) i != p1')
36a5
suff -> : inord l.+1 = ord_max :> 'I_l.+2 by [].
by apply /val_eqP; rewrite /= inordK.
have cH1 (k : 'I_l.+2 ) :
0 < k < l.+1 -> codom (u1 k) \subset [:: p2; a[p1', p3'] k].5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 3688 368d 17b2
0 < k < l.+1 ->
codom (u1 k) \subset [:: p2; a[p1', p3'] k]
move => /andP[kH1 kH2]; rewrite ffunE.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 3688 368d 17b2 17b3 17b4
codom (u (inord (l.+1 - k))) \subset
[:: p2; a[p1', p3'] k]
36bb
have F1 : k <= l.+1 by apply : ltnW.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 572 3635 1436 16ca 3688 368d 17b2 17b3 17b4 17ba
36c3 36bb
have F2 : l.+1 - k < l.+2 .
by rewrite ltn_subLR // addnS ltnS leq_addl.
have -> : a[p1', p3'] k = a[p1, p3] (inord (l.+1 - k) : 'I_l.+2 ).36cd a[p1', p3'] k = a[p1, p3] (inord (l.+1 - k))
rewrite -apegD inordK // [RHS]apegO oddB //.36cd a[p3, p1] (k + l) =
a[p3, p1] (~~ (odd l.+1 (+) odd k))
36d5
by rewrite -oddD -apegO addSn apegS addnC.
apply : cH; rewrite inordK // subn_gt0 // ltn_subLR // kH2 //=.5 129 33bb 24f 15 16 17 12 13 14 557 558 3576 561 3586 572 3635 1436 16ca 3688 368d 17b2 17b3 17b4 17ba 17c2
17d8 36bb
by rewrite addnS ltnS -{1 }[l.+1 ]add1n leq_add2r.
rewrite -addnA [X in _ <= _ + X]addnC addnA apegS.36bd (S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < l.+1 )
`d[u1 (inord i), u1 (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u1 ord0 k != p1') * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u1 ord_max k != a[p3', p1'] l) * β_[n.+2 , l.+1 ] k
3624
apply : (@case1 _ IH) cH1 _ _ _ => //.
- 36ea
by rewrite apeg_neq // eq_sym.
- 36fa
by rewrite apeg_eqC // eq_sym.
- 36ff
by rewrite eq_sym apeg_neq // eq_sym.
- 3704
by rewrite apeg_neq // eq_sym.
- 3709
by rewrite apeg_neq // eq_sym.
- 370e
rewrite ffunE subn0.368c u (inord l.+1 ) ord_max = p1'
3710
suff -> : inord l.+1 = ord_max :> 'I_l.+2 by [].
by apply /val_eqP; rewrite /= inordK.
by rewrite ffunE subnn inord_eq0 // -apegD addnn apeg_double.
move : KE; rewrite /K; do 2 case : eqP => //=.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 3628
u ord_max ord_max = a[p3, p1] l ->
u ord0 ord_max = p1 ->
0 + 0 < 1 ->
(S_[l.+1 ] n.+2 ).*2 <=
\sum_(i < l.+1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n.+2 ) (u ord0 k != p1) * β_[n.+2 , l.+1 ] k +
\sum_(k < n.+2 )
(u ord_max k != a[p3, p1] l) * β_[n.+2 , l.+1 ] k
move => uME u0E _.5 129 33bb 24f 15 16 17 12 13 14 557 558 559 3576 561 3586 3628 uME : u ord_max ord_max = a[p3, p1] l
u0E : u ord0 ord_max = p1
3571
by apply : (case3 IH _ _ _ _ _ _ cH).
Qed .
Lemma main_cor p1 p2 n :
p1 != p0 -> p2 != p0 -> p1 != p2 ->
(S_[1 ] n).*2 <= `d[`c[p1, n],`c[p2, n]]_smove.127 p1 != p0 ->
p2 != p0 ->
p1 != p2 ->
(S_[1 ] n).*2 <= `d[`c[p1 , n], `c[p2 , n]]_smove
Proof .372b
move => p1Dp0 p2Dp0 p1Dp2.5 128 129 12 13 15
(S_[1 ] n).*2 <= `d[`c[p1 , n], `c[p2 , n]]_smove
rewrite eq_sym in p2Dp0.
have [p3 [[p3Dp2 p3Dp0 p3Dp1] _]] := peg4comp3 p1Dp0 p1Dp2 p2Dp0.5 128 129 12 15 157 15c 15d 14 15e
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
rewrite eq_sym in p2Dp0.5 128 129 12 15 15c 15d 14 15e 13
373c
pose u := [ffun i : 'I_2 => if i == 0 :> nat then
`c[p1, n] else `c[p2, n]].5 128 129 12 15 15c 15d 14 15e 13 u := [ffun i => if i == 0 :> nat
then `c[p1 , n]
else `c[p2 , n]] : {ffun forall x : ordinal_finType 2 ,
(fun => configuration 4 n) x}
373c
suff :
(S_[1 ] n).*2 <=
\sum_(i < 1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n) (u ord0 k != p1) * β_[n, 1 ] k +
\sum_(k < n) (u ord_max k != p2) * β_[n, 1 ] k.3744 (S_[1 ] n).*2 <=
\sum_(i < 1 ) `d[u (inord i), u (inord i.+1 )]_smove +
\sum_(k < n) (u ord0 k != p1) * β_[n, 1 ] k +
\sum_(k < n) (u ord_max k != p2) * β_[n, 1 ] k ->
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
rewrite big_ord_recr big_ord0 !ffunE /= inord_eq0 //= add0n.3744 (S_[1 ] n).*2 <=
`d[`c[p1], if inord 1 == 0 then `c[p1] else `c[p2]]_smove +
\sum_(k < n) (`c[p1] k != p1) * β_[n, 1 ] k +
\sum_(k < n) (`c[p2] k != p2) * β_[n, 1 ] k ->
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
374a
rewrite inordK //=.3744 (S_[1 ] n).*2 <=
`d[`c[p1], `c[p2]]_smove +
\sum_(k < n) (`c[p1] k != p1) * β_[n, 1 ] k +
\sum_(k < n) (`c[p2] k != p2) * β_[n, 1 ] k ->
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
374a
rewrite (eq_bigr (fun i : 'I_n => 0 )) => [|i _]; last first .5 128 129 12 15 15c 15d 14 15e 13 3745 4ee
(`c[p1] i != p1) * β_[n, 1 ] i = 0
by rewrite !ffunE eqxx.
rewrite -(big_mkord xpredT (fun => 0 )) sum_nat_const_nat muln0.3744 (S_[1 ] n).*2 <=
`d[`c[p1], `c[p2]]_smove + 0 +
\sum_(k < n) (`c[p2] k != p2) * β_[n, 1 ] k ->
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
374a
rewrite (eq_bigr (fun i : 'I_n => 0 )) => [|i _]; last first .3758 (`c[p2] i != p2) * β_[n, 1 ] i = 0
by rewrite !ffunE eqxx.
rewrite -(big_mkord xpredT (fun => 0 )) sum_nat_const_nat muln0.3744 (S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove + 0 + 0 ->
(S_[1 ] n).*2 <= `d[`c[p1], `c[p2]]_smove
374a
by rewrite !addn0.
apply : (@main p1 p3 p2) => //.
by rewrite eq_sym.
by case => [] [].
Qed .
Lemma gdist_shanoi4 (n : nat) (p1 p2 : peg 4 ) :
p1 != p2 -> p1 != p0 -> p2 != p0 ->
`d[`c[p1, n], `c[p2, n]]_smove = (S_[1 ] n).*2 .5 129 229
p1 != p2 ->
p1 != p0 ->
p2 != p0 ->
`d[`c[p1 , n], `c[p2 , n]]_smove = (S_[1 ] n).*2
Proof .3780
move => p1Dp2 p1Dp0 p2Dp0; apply /eqP; rewrite eqn_leq.5 129 229 15 12 13
`d[`c[p1], `c[p2]]_smove <= (S_[1 ] n).*2 <=
`d[`c[p1], `c[p2]]_smove
by rewrite leq_shanoi4 // main_cor.
Qed .
End sHanoi4 .