Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coq-pactole
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pactole
coq-pactole
Commits
075ab33e
Commit
075ab33e
authored
1 year ago
by
MathisBD
Browse files
Options
Downloads
Patches
Plain Diff
proof of weber_majority_weak
parent
d0e91e46
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CaseStudies/Gathering/InR2/Weber/Weber_point.v
+20
-9
20 additions, 9 deletions
CaseStudies/Gathering/InR2/Weber/Weber_point.v
with
20 additions
and
9 deletions
CaseStudies/Gathering/InR2/Weber/Weber_point.v
+
20
−
9
View file @
075ab33e
...
@@ -1628,19 +1628,30 @@ Qed.
...
@@ -1628,19 +1628,30 @@ Qed.
End
WeberFirstOrder
.
End
WeberFirstOrder
.
Lemma
list_sum_alls
x
n
:
(
*
This
is
an
application
of
weber_first_order
.
*
)
list_sum
(
alls
x
n
)
==
((
INR
n
)
*
x
)
%
R
.
Proof
.
Admitted
.
Lemma
weber_majority_weak
ps
w
:
Lemma
weber_majority_weak
ps
w
:
countA_occ
equiv
R2_EqDec
w
ps
>=
(
Nat
.
div2
(
length
ps
+
1
))
->
Weber
ps
w
.
countA_occ
equiv
R2_EqDec
w
ps
>=
(
Nat
.
div2
(
length
ps
+
1
))
->
Weber
ps
w
.
Proof
.
Proof
.
intros
Hcount
.
rewrite
ge_le_iff
in
Hcount
.
rewrite
weber_first_order
.
intros
Hcount
.
rewrite
ge_le_iff
in
Hcount
.
rewrite
weber_first_order
.
(
*
rewrite
weber_first_order
.
rewrite
list_sumVS_norm
.
*
)
assert
(
Hineq
:
(
norm
(
list_sumVS
(
map
(
u
w
)
ps
))
+
INR
(
countA_occ
equiv
R2_EqDec
w
ps
)
<=
INR
(
length
ps
))
%
R
).
(
*
rewrite
(
@
list_sum_le
_
(
alls
1
%
R
(
Nat
.
div2
(
length
ps
+
1
)))).
*
)
{
(
*
+
rewrite
list_sum_alls
,
Rmult_1_r
.
apply
le_INR
.
assumption
.
*
)
clear
Hcount
.
(
*
+
etransitivity
;
[
|
exact
Hcount
].
*
)
induction
ps
as
[
|
p
ps
IH
].
Admitted
.
+
simpl
.
rewrite
Rmult_0_l
,
Rplus_0_l
,
sqrt_0
.
lra
.
+
cbn
[
countA_occ
length
map
list_sumVS
].
case
(
R2_EqDec
p
w
)
as
[
Hpw
|
Hpw
].
-
unfold
u
at
1.
rewrite
Hpw
,
add_opp
,
unitary_origin
,
add_origin_l
.
rewrite
S_INR
,
S_INR
.
lra
.
-
transitivity
(
1
%
R
+
norm
(
list_sumVS
(
map
(
u
w
)
ps
))
+
INR
(
countA_occ
equiv
R2_EqDec
w
ps
))
%
R
.
*
apply
Rplus_le_compat_r
.
rewrite
triang_ineq
.
apply
Rplus_le_compat_r
.
unfold
u
.
rewrite
norm_unitary
;
[
lra
|
].
intros
H
.
rewrite
R2sub_origin
in
H
.
intuition
.
*
rewrite
S_INR
.
lra
.
}
transitivity
(
INR
(
Nat
.
div2
(
length
ps
+
1
)))
;
[
|
now
apply
le_INR
].
eapply
Rplus_le_reg_r
;
rewrite
Hineq
.
Search
INR
Rle
le
.
rewrite
<-
(
Rplus_le_compat_l
(
INR
(
Nat
.
div2
(
length
ps
+
1
)))
_
_
(
le_INR
_
_
Hcount
)).
rewrite
<-
plus_INR
.
apply
le_INR
.
apply
div2_sum_p1_ge
.
Qed
.
Lemma
weber_majority
ps
w
:
Lemma
weber_majority
ps
w
:
countA_occ
equiv
R2_EqDec
w
ps
>
(
Nat
.
div2
(
length
ps
+
1
))
->
OnlyWeber
ps
w
.
countA_occ
equiv
R2_EqDec
w
ps
>
(
Nat
.
div2
(
length
ps
+
1
))
->
OnlyWeber
ps
w
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment