Skip to content

Commit de57fac

Browse files
committed
add script to remove trailing whitespace
<!-- ps-id: 925b1ad7-6f77-4af7-9bcc-67adb5a6f2f9 --> Signed-off-by: Ali Caglayan <[email protected]>
1 parent 6d17871 commit de57fac

File tree

109 files changed

+346
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+346
-341
lines changed

STYLE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
44
<!-- *generated with [DocToc](https://github.com/thlorenz/doctoc)* -->
55
<!-- Ali: VSCode is able to do the TOC using the "Markdown All in One" extension. Section numbering too! -->
6-
## Table of Contents
6+
## Table of Contents
77

88
- [1. Conventions And Style Guide](#1-conventions-and-style-guide)
99
- [1.1. Organization](#11-organization)
@@ -676,7 +676,7 @@ in `bar` appropriately.
676676

677677
(It is possible to explicitly declare and name universes globally with
678678
the `Universe` command, but we are not using that in the HoTT
679-
library. Universes declared with `Universe` will be discharged on each
679+
library. Universes declared with `Universe` will be discharged on each
680680
section definition independently.)
681681

682682
Unfortunately it is not currently possible to declare the universe
@@ -1124,7 +1124,7 @@ where they are defined.
11241124
The unification algorithm used by `apply` is different and often
11251125
less powerful than the one used by `refine`, though it is
11261126
occasionally better at pattern matching.
1127-
1127+
11281128
Here are some tips:
11291129
- If `apply` fails with a unification error you think it shouldn't
11301130
have, try `rapply`.
@@ -1135,7 +1135,7 @@ where they are defined.
11351135
- If you don't want Coq to create evars for certain subgoals,
11361136
add an `s` to the tactic name to make it use `simple refine`.
11371137

1138-
1138+
11391139
## 1.12. Contributing to the library ##
11401140

11411141
### 1.12.1. Fork & Pull ###

contrib/SetoidRewrite.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Proof.
9999
intros f1 f2.
100100
apply (is0functor_postcomp a b c g ).
101101
Defined.
102-
102+
103103
#[export] Instance IsProper_catcomp {A : Type} `{Is1Cat A}
104104
{a b c : A}
105105
: CMorphisms.Proper (GpdHom ==> GpdHom ==> GpdHom)
@@ -111,7 +111,7 @@ Proof.
111111
exact eq_g.
112112
Defined.
113113

114-
#[export] Instance gpd_hom_to_hom_proper {A B: Type} `{Is0Gpd A}
114+
#[export] Instance gpd_hom_to_hom_proper {A B: Type} `{Is0Gpd A}
115115
{R : Relation B} (F : A -> B)
116116
`{CMorphisms.Proper _ (GpdHom ==> R) F}
117117
: CMorphisms.Proper (Hom ==> R) F.
@@ -194,7 +194,7 @@ Defined.
194194

195195
Proposition nat_equiv_faithful {A B : Type}
196196
{F G : A -> B} `{Is1Functor _ _ F}
197-
`{!Is0Functor G, !Is1Functor G}
197+
`{!Is0Functor G, !Is1Functor G}
198198
`{!HasEquivs B} (tau : NatEquiv F G)
199199
: Faithful F -> Faithful G.
200200
Proof.

etc/Book.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def die(msg):
190190
content = content[content.index('\n')+1:]
191191
# Update Book_X_Y_Z
192192
book = "_".join(map(str,entry['number']))
193-
# content = re.sub('Book_[0-9_]*[0-9]', 'Book_{0}'.format(book), content)
193+
# content = re.sub('Book_[0-9_]*[0-9]', 'Book_{0}'.format(book), content)
194194
# content = re.sub('Definition Book_[0-9_]*[0-9]', 'Definition Book_{0}'.format(book), content)
195195
# previous two removed since they break Exercise 2.2 and 2.3
196196
# It is a common error to write things like Lemma_X_Y_Z instead of Book_X_Y_Z,

etc/coqcreplace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def replace(vfile):
169169
if not match:
170170
break
171171
lines[i] = replace_match(match, coqc_replace, lines[i])
172-
172+
173173
attempts += 1
174174
with open(vfile, 'w', encoding="utf-8") as f:
175175
f.write(''.join(lines))

etc/fix_trailing_whitespace.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
# This command removes trailing whitespace from all files in the repository.
4+
5+
git grep -l -z -E '\s+$' | xargs -0 sed -i 's/\s\+$//'

etc/generate_coqproject.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ else
1010
fi
1111

1212
## List untracked .v files
13-
#UNTRACKED_V_FILES=$(git ls-files --others --exclude-standard "*.v")
13+
#UNTRACKED_V_FILES=$(git ls-files --others --exclude-standard "*.v")
1414

1515
## Combine untracked and tracked .v files
1616
printf -v UNSORTED_V_FILES '%s\n%s' "$TRACKED_V_FILES" "$UNTRACKED_V_FILES"

etc/homotopy.css

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
text in crazy fonts and colors. */
33

44
body { padding: 0px 0px;
5-
margin: 0px 0px;
5+
margin: 0px 0px;
66
background-color: white }
77

88
#page { display: block;
@@ -18,7 +18,7 @@ body { padding: 0px 0px;
1818
border-bottom-style: solid;
1919
border-width: thin }
2020

21-
#header h1 { padding: 0;
21+
#header h1 { padding: 0;
2222
margin: 0;}
2323

2424

@@ -45,28 +45,28 @@ body { padding: 0px 0px;
4545
#main .keyword { color : #cf1d1d }
4646
#main { color: black }
4747

48-
.section {padding-top: 13px;
49-
padding-bottom: 13px;
50-
padding-left: 3px;
48+
.section {padding-top: 13px;
49+
padding-bottom: 13px;
50+
padding-left: 3px;
5151
margin-top: 5px;
5252
margin-bottom: 5px;
5353
font-size : 175% }
5454

55-
h2.section {padding-left: 3px;
56-
padding-top: 12px;
57-
padding-bottom: 10px;
55+
h2.section {padding-left: 3px;
56+
padding-top: 12px;
57+
padding-bottom: 10px;
5858
font-size : 130% }
5959

60-
h3.section {padding-left: 3px;
61-
padding-top: 7px;
62-
padding-bottom: 7px;
60+
h3.section {padding-left: 3px;
61+
padding-top: 7px;
62+
padding-bottom: 7px;
6363
font-size : 115% }
6464

65-
h4.section {
65+
h4.section {
6666
background-color: white;
67-
padding-left: 0px;
68-
padding-top: 0px;
69-
padding-bottom: 0px;
67+
padding-left: 0px;
68+
padding-top: 0px;
69+
padding-bottom: 0px;
7070
font-size : 100%;
7171
font-style : bold;
7272
text-decoration : underline;
@@ -81,45 +81,45 @@ h4.section {
8181
padding-bottom: 10px;
8282
border-style: plain}
8383

84-
.inlinecode {
84+
.inlinecode {
8585
display: inline;
8686
/* font-size: 125%; */
8787
color: #666666;
88-
font-family: monospace }
88+
font-family: monospace }
8989

90-
.doc .inlinecode {
90+
.doc .inlinecode {
9191
display: inline;
92-
font-size: 120%;
92+
font-size: 120%;
9393
color: rgb(30%,30%,70%);
94-
font-family: monospace }
94+
font-family: monospace }
9595

96-
.doc .inlinecode .id {
97-
color: rgb(30%,30%,70%);
98-
}
96+
.doc .inlinecode .id {
97+
color: rgb(30%,30%,70%);
98+
}
9999

100-
.inlinecodenm {
100+
.inlinecodenm {
101101
display: inline;
102102
color: #444444;
103103
}
104104

105-
.doc .code {
105+
.doc .code {
106106
display: inline;
107-
font-size: 120%;
108-
color: rgb(30%,30%,70%);
109-
font-family: monospace }
107+
font-size: 120%;
108+
color: rgb(30%,30%,70%);
109+
font-family: monospace }
110110

111-
.comment {
111+
.comment {
112112
display: inline;
113113
font-family: monospace;
114-
color: rgb(50%,50%,80%);
115-
}
114+
color: rgb(50%,50%,80%);
115+
}
116116

117-
.code {
117+
.code {
118118
display: block;
119119
/* padding-left: 15px; */
120-
font-size: 110%;
120+
font-size: 110%;
121121
font-family: monospace;
122-
}
122+
}
123123

124124
table.infrule {
125125
border: 0px;
@@ -141,7 +141,7 @@ tr.infrulemiddle hr {
141141
}
142142

143143
.infrulenamecol {
144-
color: rgb(60%,60%,60%);
144+
color: rgb(60%,60%,60%);
145145
font-size: 80%;
146146
padding-left: 1em;
147147
padding-bottom: 0.1em
@@ -154,55 +154,55 @@ tr.infrulemiddle hr {
154154

155155
.id { display: inline; }
156156

157-
.id[type="constructor"] {
157+
.id[type="constructor"] {
158158
color: rgb(60%,0%,0%);
159159
}
160160

161-
.id[type="var"] {
161+
.id[type="var"] {
162162
color: rgb(40%,0%,40%);
163163
}
164164

165-
.id[type="variable"] {
165+
.id[type="variable"] {
166166
color: rgb(40%,0%,40%);
167167
}
168168

169-
.id[type="definition"] {
169+
.id[type="definition"] {
170170
color: rgb(0%,40%,0%);
171171
}
172172

173-
.id[type="abbreviation"] {
173+
.id[type="abbreviation"] {
174174
color: rgb(0%,40%,0%);
175175
}
176176

177-
.id[type="lemma"] {
177+
.id[type="lemma"] {
178178
color: rgb(0%,40%,0%);
179179
}
180180

181-
.id[type="instance"] {
181+
.id[type="instance"] {
182182
color: rgb(0%,40%,0%);
183183
}
184184

185-
.id[type="projection"] {
185+
.id[type="projection"] {
186186
color: rgb(0%,40%,0%);
187187
}
188188

189-
.id[type="method"] {
189+
.id[type="method"] {
190190
color: rgb(0%,40%,0%);
191191
}
192192

193-
.id[type="inductive"] {
193+
.id[type="inductive"] {
194194
color: rgb(0%,0%,80%);
195195
}
196196

197-
.id[type="record"] {
197+
.id[type="record"] {
198198
color: rgb(0%,0%,80%);
199199
}
200200

201-
.id[type="class"] {
201+
.id[type="class"] {
202202
color: rgb(0%,0%,80%);
203203
}
204204

205-
.id[type="keyword"] {
205+
.id[type="keyword"] {
206206
color : #cf1d1d;
207207
/* color: black; */
208208
}

test/Algebra/Groups/Presentation.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Local Open Scope mc_mult_scope.
66
Check ⟨ x | x * x * x , -x ⟩.
77
Check ⟨ x , y | x * y , x * y * x , x * (-y) * x * x * x⟩.
88
Check ⟨ x , y , z | x * y * z , x * -z , x * y⟩.
9-
9+

test/Metatheory/FunextVarieties.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From HoTT.Metatheory Require Import FunextVarieties.
1+
From HoTT.Metatheory Require Import FunextVarieties.
22

33
(** Checking the universes of FunextVarieties.v *)
44

theories/Algebra/AbGroups/Abelianization.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ From this we can show that Abel G is an abelian group.
3030
3131
In fact this models the following HIT:
3232
33-
HIT Abel (G : Group) :=
33+
HIT Abel (G : Group) :=
3434
| ab : G -> Abel G
3535
| ab_comm : forall x y z, ab (x * (y * z)) = ab (x * (z * y)).
3636
@@ -77,7 +77,7 @@ Section Abel.
7777
Global Instance istrunc_abel : IsHSet Abel := _.
7878

7979
(** We can derive the induction principle from the ones for truncation and the coequalizer. *)
80-
Definition Abel_ind (P : Abel -> Type) `{forall x, IsHSet (P x)}
80+
Definition Abel_ind (P : Abel -> Type) `{forall x, IsHSet (P x)}
8181
(a : forall x, P (ab x)) (c : forall x y z, DPath P (ab_comm x y z)
8282
(a (x * (y * z))) (a (x * (z * y))))
8383
: forall (x : Abel), P x.
@@ -111,7 +111,7 @@ Section Abel.
111111
Defined.
112112

113113
(** Here is a simpler version of Abel_ind when our target is an HProp. This lets us discard all the higher paths. *)
114-
Definition Abel_ind_hprop (P : Abel -> Type) `{forall x, IsHProp (P x)}
114+
Definition Abel_ind_hprop (P : Abel -> Type) `{forall x, IsHProp (P x)}
115115
(a : forall x, P (ab x)) : forall (x : Abel), P x.
116116
Proof.
117117
srapply (Abel_ind _ a).

0 commit comments

Comments
 (0)