Physlib.Meta.Notes.Basic
7 declarations
Persistent Environment Extension for Note Storage
#noteExtensionThe `Physlib.noteExtension` is a persistent environment extension in Lean designed to store and manage information associated with the `note` command. It maintains a state consisting of an array of `NoteInfo` objects, allowing metadata and documentation notes to be preserved across different files and sessions within the Lean environment.
Syntax for the `note` command
#note_commentThe definition specifies the syntax for the `note` command, which allows a user to provide a string literal as an annotation within the Lean environment. The command is structured as `note` , where is a string.
Elaborator for the `note` Command
#elabNoteThe definition `elabNote` serves as the command elaborator for the `note` syntax. When the command `note s` is invoked, where is a string literal, the elaborator extracts the text content of , the name of the current module, and the line number of the command's occurrence. This metadata is then bundled into a `NoteInfo` structure and registered within the persistent environment extension `noteExtension` to facilitate the tracking of notes within the Lean environment.
Environment extension for `note_attr` declarations
#noteDeclExtensionThe `Physlib.noteDeclExtension` is a persistent environment extension used to store a collection of names of declarations that have been tagged with the `note_attr` attribute. This extension maintains these names in an array, allowing the Lean environment to track which formal commands are associated with the note-taking system.
`note_attr` attribute displays formally verified commands
#noteAttributeThe `noteAttribute` is a constant of type unit representing the `note_attr` attribute. This attribute is used to tag and display formally verified commands within a note.
Environment Extension for Informal Note Declarations
#noteInformalDeclExtensionThe `Physlib.noteInformalDeclExtension` is a persistent environment extension designed to store and manage declarations associated with the `note_attr_informal` attribute. Specifically, it is a `SimplePersistentEnvExtension` that maps Lean `Name` identifiers to an `Array` of `Name` identifiers, allowing informal commands and notes to be tracked within the Lean environment.
Attribute for Displaying Informal Note Commands
#noteInformalAttributeThe `note_attr_informal` attribute is a marker used to display informal commands within a Lean note.
