Commit 2023-01-19 07:45 d6d859a7

View on Github →

chore: format by line breaks (#1523) During porting, I usually fix the desired format we seem to want for the line breaks around by with

awk '{do {{if (match($0, "^  by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean

I noticed there are some more files that slipped through. This pull request is the result of running this command:

grep -lr "^  by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^  by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'

Estimated changes

modified theorem div_sq_cancel
modified theorem pow_sub_of_lt
modified theorem pow_sub₀
modified theorem zero_zpow_eq
modified theorem zpow_add₀
modified theorem zpow_bit1₀
modified theorem zpow_neg_mul_zpow_self
modified theorem exists_floor
modified theorem exists_nat_ge
modified theorem exists_nat_one_div_lt
modified theorem exists_pow_lt_of_lt_one
modified theorem exists_rat_btwn
modified theorem PNat.Coprime.mul
modified theorem PNat.Coprime.mul_right
modified theorem PNat.Coprime.symm
modified theorem PNat.Prime.ne_one
modified theorem PNat.Prime.not_dvd_one
modified theorem PNat.dvd_prime
modified theorem PNat.exists_prime_and_dvd
modified theorem PNat.gcd_comm
modified theorem PNat.gcd_eq_left
modified theorem PNat.gcd_eq_left_iff_dvd
modified theorem PNat.gcd_eq_right_iff_dvd
modified theorem PNat.one_gcd
modified theorem Rat.cast_inv_int
modified theorem Rat.cast_inv_nat
modified theorem Rat.cast_mk_of_ne_zero
modified theorem Rat.cast_pos_of_pos
modified theorem Rat.preimage_cast_Icc
modified theorem Rat.preimage_cast_Ici
modified theorem Rat.preimage_cast_Ico
modified theorem Rat.preimage_cast_Iic
modified theorem Rat.preimage_cast_Iio
modified theorem Rat.preimage_cast_Ioc
modified theorem Rat.preimage_cast_Ioi
modified theorem Rat.preimage_cast_Ioo
modified theorem IsSimpleOrder.bot_ne_top
modified theorem Set.Ici.isAtom_iff
modified theorem Set.Iic.isCoatom_iff
modified theorem supₛ_atoms_eq_top
modified theorem supₛ_atoms_le_eq
modified theorem Set.compl_cIcc
modified theorem Set.compl_cIoo
modified theorem sbtw_iff_not_btw