- These [[🧩 Lean4 set_options]] conform to the [[🧩 LeanNotes coding style#Summary|LeanNotes coding style]] which attempts to provide a gentler first exposure to the concepts that make Lean such a powerful proof assistant. Depending on the .lean file, one or more of these options may be appropriate: | Set options | Description | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `set_option eval.type true` | Include the expression type when an \#eval expression is computed. | | `set_option linter.style.emptyLine false` | Disable blank line warning inside a definition. | | `set_option autoImplicit false` | Disallow implicit arguments so that everything is explicitly declared. | | `set_option linter.style.commandStart false` | Disable warnings for columnized spacing | | `set_option linter.style.whitespace false` | Ignore whitespace errors, including alignment spacing | | `set_option autoImplicit false` | <br> With this option off, you must explicitly declare all implicit arguments. This can be useful for debugging or for writing very precise, low-level definitions.<br> | | `set_option trace.Meta.Tactic.dsimp true` | [Lean4: explain set_option trace.Meta.Tactic.dsimp true - Google Search](https://www.google.com/search?client=safari&rls=en&q=Lean4%3A+explain+set_option+trace.Meta.Tactic.dsimp+true&ie=UTF-8&oe=UTF-8)<br>Display in the infoview or the message log the steps when the dsimp tactic is evaluated<br><br>[[exact?, apply?, find?, set_option ...Tactic.simp true]]<br><br>[[1](https://lean-lang.org/doc/reference/latest/The-Simplifier/Configuring-Simplification/), [2](https://lean-lang.org/doc/reference/latest/releases/v4.12.0/), [3](https://github.com/leanprover/lean4/issues/6969), [4](https://lean-lang.org/doc/reference/latest/Tactic-Proofs/Tactic-Reference/)] | | | | | | | # set_option pp.fieldNotation false `set_option pp.fieldNotation false` tells Lean’s pretty-printer not to display structure-field access using field notation. In other words, when Lean prints a term involving a record field or projection, it will prefer the more explicit underlying form instead of the nicer `obj.field` style. This is useful when you want output that is easier to read in a more compiler-like or kernel-style way, especially when debugging elaboration, definitions, or generated terms. It does not change the actual meaning of the code or how it runs; it only changes how Lean renders the term in messages, goals, and output. For example, a field access like `p.x` may normally be shown with field notation when the option is enabled. With `pp.fieldNotation false`, Lean may print the equivalent projection more explicitly, such as showing the projection function applied to the structure rather than the syntactic sugar. This is often handy when you want to see the exact internal representation rather than the user-friendly notation. ```lean set_option pp.fieldNotation false -- explained ``` - set_option`: This is a top-level command in Lean 4 used to configure environment options, compiler flags, kernel behaviors, and pretty-printer settings. - `pp`: Short for pretty printer, the subsystem responsible for converting internal Lean expressions (abstract syntax trees) back into readable human text. - `fieldNotation`: A boolean option that controls whether Lean's pretty printer uses dot notation (also known as projection or method notation, such as `b.not` or `x.foo`) when rendering function applications where the first argument matches the namespace or type. - `false`: Disables this feature. When `pp.fieldNotation` is set to `false`, the pretty printer strictly displays all function applications in their standard prefix/functional form (e.g., `not b` instead of `b.not`). - `Why this is used here`: This ensures complete transparency and prevents ambiguity during proof development and inspection. By forcing prefix notation, it becomes immediately clear how functions like `not` and `and` are applied, avoiding any confusion between dot-notation methods and standalone functions. ## Credits **`LeanNotes curator:`** [[👤 dducoff]], [Contact dducoff](https://tally.so/r/rjQYWL) **`Posted Date:`** 2026-08-18