Skip to content

more uniform variable naming convention#314

Merged
CohenCyril merged 4 commits intomasterfrom
classical_sets_naming
Jan 26, 2021
Merged

more uniform variable naming convention#314
CohenCyril merged 4 commits intomasterfrom
classical_sets_naming

Conversation

@affeldt-aist
Copy link
Member

  • enforce the convention of using T, U for names of variables
    in Type (or choiceType an pointedType)
    • as a consequence functions are of type T -> U
    • use I when the type corresponds to an index
  • enforce the convention that sets are named A, B, C, D, etc.
    • indexed sets are rather named F
    • use X for set T and Y for set U when it makes sense when
      we are talking about images/preimages
    • keep X for sets of pairs
  • small reordering of lemmas in sections (basic_lemmas,
    image_lemmas, bigop_lemmas) to take advantage of Implicit Types

@affeldt-aist affeldt-aist changed the title more uniform naming convention more uniform variable naming convention Jan 14, 2021
@CohenCyril
Copy link
Member

I'd rather reuse the convetions from mathcomp/ssreflect/finset.v

  • enforce the convention of using T, U for names of variables
    in Type (or choiceType an pointedType)

Use T (if multiple types, use a suffix as in T' or T1 ... Tn or a prefix as in aT for domain type or rT return type)

  • use I when the type corresponds to an index

Use I or J for indexes.

  • enforce the convention that sets are named A, B, C, D, etc.

Yes

  • indexed sets are rather named F
  • use X for set T and Y for set U when it makes sense when

Use the same sufix or prefix for the sets as their containing type (e.g. A1 in T1, etc)

we are talking about images/preimages
  • keep X for sets of pairs

or remove the suffix? (e.g. A : set (T1 * T2))

  • small reordering of lemmas in sections (basic_lemmas,
    image_lemmas, bigop_lemmas) to take advantage of Implicit Types

@CohenCyril
Copy link
Member

CohenCyril commented Jan 18, 2021

  • document these choices in the header?

@affeldt-aist affeldt-aist added this to the 0.3.6 milestone Jan 19, 2021
Copy link
Member

@CohenCyril CohenCyril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CohenCyril
Copy link
Member

Please rebase and then we merge

- enforce the convention of using T, U for names of variables
  in Type (or choiceType an pointedType)
  + as a consequence functions are of type T -> U
  + use I when the type corresponds to an index
- enforce the convention that sets are named A, B, C, D, etc.
  + indexed sets are rather named F
  + use X for set T and Y for set U when it makes sense when
    we are talking about images/preimages
  + keep X for sets of pairs
- small reordering of lemmas in sections (basic_lemmas,
  image_lemmas, bigop_lemmas) to take advantage of Implicit Types
- address comments by Cyril
- document naming choices in the header
- no more "ill-named" sets X or E or "ill-named" types U
@affeldt-aist affeldt-aist force-pushed the classical_sets_naming branch from bc182e7 to 60271d8 Compare January 26, 2021 15:51
@CohenCyril CohenCyril merged commit 31562ae into master Jan 26, 2021
@affeldt-aist affeldt-aist deleted the classical_sets_naming branch January 29, 2021 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants