path
stringlengths
11
71
content
stringlengths
75
124k
Data\Int\Cast\Lemmas.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Ring.Hom.Basic import Mathlib.Algebra.Ring.Int /-! # Cast of integers (additional theorems) This file proves additional properties about the ...
Data\Int\Cast\Prod.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Nat.Cast.Prod /-! # The product of two `AddGroupWithOne`s. -/ namespace Prod variable {α β : Type*} [AddGroupWithOne α] [AddGroupWithOne β] i...
Data\Int\Order\Lemmas.lean
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Algebra.Order.Ring.Abs /-! # Further lemmas about the integers The distinction between this file and `Data.Int.Order.Basic` is not particularly clear. ...
Data\Int\Order\Units.lean
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Algebra.Order.Ring.Abs /-! # Lemmas about units in `ℤ`, which interact with the order structure. -/ namespace Int theorem isUnit_iff_abs_eq {x : ℤ} :...
Data\LazyList\Basic.lean
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Control.Traversable.Equiv import Mathlib.Control.Traversable.Instances import Batteries.Data.LazyList import Mathlib.Lean.Thunk /-! ## Definitions on lazy l...
Data\List\AList.lean
/- Copyright (c) 2018 Sean Leather. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sean Leather, Mario Carneiro -/ import Mathlib.Data.List.Sigma /-! # Association Lists This file defines association lists. An association list is a list where every element consists o...
Data\List\Basic.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.Nat.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.List.Defs im...
Data\List\Chain.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau, Yury Kudryashov -/ import Mathlib.Logic.Relation import Mathlib.Data.List.Forall2 import Mathlib.Data.List.Lex import Mathlib.Data.List.Infix /-! # Relation...
Data\List\Count.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.Nat.Defs /-! # Counting in lists This file proves basic properties of `L...
Data\List\Cycle.lean
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.Fintype.List /-! # Cycles of a list Lists have an equivalence relation of whether they are rotational permutations of one another. This relati...
Data\List\Dedup.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lattice /-! # Erasure of duplicates in a list This file proves basic results about `List.dedup` (definition ...
Data\List\Defs.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.Nat.Notation import Mathlib.Control.Functor import Mathlib.Data.SProd impo...
Data\List\Destutter.lean
/- Copyright (c) 2022 Eric Rodriguez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Rodriguez, Eric Wieser -/ import Mathlib.Data.List.Chain /-! # Destuttering of Lists This file proves theorems about `List.destutter` (in `Data.List.Defs`), which greedily remov...
Data\List\DropRight.lean
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.List.Infix /-! # Dropping or taking from lists on the right Taking or removing element from the tail end of a list ## Main definitions - `rd...
Data\List\Duplicate.lean
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Chris Hughes -/ import Mathlib.Data.List.Nodup /-! # List duplicates ## Main definitions * `List.Duplicate x l : Prop` is an inductive property that holds when `x`...
Data\List\Enum.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Yakov Pechersky, Eric Wieser -/ import Batteries.Tactic.Alias import Mathlib.Tactic.TypeStar import Mathlib.Data.Nat.Notation /-! # Properties of `List.enum` -/ names...
Data\List\FinRange.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau, Scott Morrison, Alex Keizer -/ import Mathlib.Data.List.OfFn import Mathlib.Data.List.Range /-! # Lists of elements of `Fin n` This file develops some resu...
Data\List\Forall2.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.Data.List.Basic /-! # Double universal quantification on a list This file provides an API for `List.Forall₂` (definition in `Data.Lis...
Data\List\GetD.lean
/- Copyright (c) 2024 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Init...
Data\List\Indexes.lean
/- Copyright (c) 2020 Jannis Limperg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jannis Limperg -/ import Mathlib.Data.List.OfFn import Mathlib.Data.List.Range import Mathlib.Data.List.Zip /-! # Lemmas about List.*Idx functions. Some specification lemmas for `Lis...
Data\List\Infix.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Basic /-! # Prefixes, suffixes, infixes This file proves properties about * `List.isPrefix`: `l₁` is a prefix of `l₂` if `l₂` starts with `...
Data\List\InsertNth.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Basic /-! # insertNth Proves various lemmas about `List.insertNth`....
Data\List\Intervals.lean
/- Copyright (c) 2019 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Data.List.Lattice import Mathlib.Data.Bool.Basic import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Order.Lattice /-! # Intervals in ℕ This file defin...
Data\List\Iterate.lean
/- Copyright (c) 2024 Miyahara Kō. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Miyahara Kō -/ import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.List.Defs import Mathlib.Data.Set.Function /-! # iterate Proves various lemmas about `List.iterate`. -/ variab...
Data\List\Join.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn, Mario Carneiro, Martin Dvorak -/ import Mathlib.Data.List.Basic /-! # Join of a list of lists This file proves basic properties of `List.join`, w...
Data\List\Lattice.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro, Scott Morrison -/ import Mathlib.Data.List.Basic /-! # Lattice structure of lists This files p...
Data\List\Lemmas.lean
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Yury Kudryashov -/ import Mathlib.Data.Set.Image import Mathlib.Data.List.InsertNth import Mathlib.Init.Data.List.Lemmas /-! # Some lemmas about lists involving sets...
Data\List\Lex.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Order.RelClasses import Mathlib.Data.List.Basic /-! # Lexicographic ordering of lists. The lexicographic order on `List α` is defined by `L < M` iff ...
Data\List\MinMax.lean
/- Copyright (c) 2019 Minchao Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Minchao Wu, Chris Hughes, Mantas Bakšys -/ import Mathlib.Data.List.Basic import Mathlib.Order.MinMax import Mathlib.Order.WithBot /-! # Minimum and maximum of lists ## Main definitions ...
Data\List\NatAntidiagonal.lean
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Data.List.Nodup /-! # Antidiagonals in ℕ × ℕ as lists This file defines the antidiagonals of ℕ × ℕ as lists: the `n`-th antidiagonal is the list of p...
Data\List\Nodup.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau -/ import Mathlib.Data.List.Forall2 import Mathlib.Data.Set.Pairwise.Basic import Mathlib.Init.Data.Fin.Basic /-! # Lists with no duplicates `List.Nodup` is...
Data\List\NodupEquivFin.lean
/- Copyright (c) 2020 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Data.List.Duplicate import Mathlib.Data.List.Sort /-! # Equivalence between `Fin (length l)` and elements of a list Given a list `l`, * if `...
Data\List\OfFn.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Basic /-! # Lists from functions Theorems and lemmas for dealing with `List.ofFn`, which converts a fun...
Data\List\Pairwise.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Logic.Relation import Mathlib.Data.List.Basic /-! # Pairwise relations on a list This file provides basic results about...
Data\List\Palindrome.lean
/- Copyright (c) 2020 Google LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Wong -/ import Mathlib.Data.List.Basic /-! # Palindromes This module defines *palindromes*, lists which are equal to their reverse. The main result is the `Palindrome` inductive t...
Data\List\Perm.lean
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Mario Carneiro -/ import Mathlib.Data.List.Count import Mathlib.Data.List.Dedup import Mathlib.Data.List.Duplicate import Mathlib.Data.List.Ins...
Data\List\Permutation.lean
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Join /-! # Permutations of a list In this file we prove properties ...
Data\List\Pi.lean
/- Copyright (c) 2023 Yuyang Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuyang Zhao -/ import Mathlib.Data.Multiset.Pi /-! # The cartesian product of lists ## Main definitions * `List.pi`: Cartesian product of lists indexed by a list. -/ namespace List n...
Data\List\Prime.lean
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen -/ import Mathlib.Algebra.Associated.Basic import Mathlib.Algebra.BigOperators.Group.List import Mathlib.Data.List.Perm /-! # Products of l...
Data\List\ProdSigma.lean
/- Copyright (c) 2015 Leonardo de Moura. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro -/ import Mathlib.Data.List.Basic import Mathlib.Data.Sigma.Basic import Batteries.Data.Nat.Lemmas /-! # Lists in product and sigma types This fi...
Data\List\Range.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau, Scott Morrison -/ import Mathlib.Data.List.Chain import Mathlib.Data.List.Nodup import Mathlib.Data.List.Pairwise import Batteries.Data.Nat.Lemmas /-! # Ran...
Data\List\ReduceOption.lean
/- Copyright (c) 2020 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.List.Basic /-! # Properties of `List.reduceOption` In this file we prove basic lemmas about `List.reduceOption`. -/ namespace List variable ...
Data\List\Rotate.lean
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yakov Pechersky -/ import Mathlib.Data.List.Nodup import Mathlib.Data.Nat.Defs import Mathlib.Data.List.Infix /-! # List rotation This file proves basic results about `Li...
Data\List\Sections.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Forall2 /-! # List sections This file proves some stuff about `List.sections` (definition in `Data.List.Defs`). A section of a list of lists...
Data\List\Sigma.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Sean Leather -/ import Mathlib.Data.List.Perm import Mathlib.Data.List.Pairwise /-! # Utilities for lists of sigmas This file includes several ways of interacting wit...
Data\List\Sort.lean
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix import Mathlib.Order.Fin.Basic /-! # Sorting algorithms on lists In this f...
Data\List\Sublists.lean
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.List.Perm import Mathlib.Data.List.Range /-! # sublists `List.Sublists` gives a list of all (not necessaril...
Data\List\Sym.lean
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Sym.Sym2 /-! # Unordered tuples of elements of a list Defines `List.sym` and the specialized `List.sym2` for comp...
Data\List\TFAE.lean
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Simon Hudon -/ import Batteries.Data.List.Lemmas import Batteries.Tactic.Classical import Mathlib.Tactic.TypeStar /-! # The Following Are Equivalent This file allows ...
Data\List\ToFinsupp.lean
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.Finsupp.Defs import Mathlib.Data.List.GetD /-! # Lists as finsupp ## Main definitions - `List.toFinsupp`: Interpret a list as a finitely sup...
Data\List\Zip.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau -/ import Mathlib.Data.List.Forall2 /-! # zip & unzip This file provides results about `List.zipWith`, `List.zip` and `List.unzip` (definitions are in core ...
Data\List\EditDistance\Bounds.lean
/- Copyright (c) 2023 Kim Liesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Liesinger -/ import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.List.Infix import Mathlib.Data.List.MinMax import Mathlib.Data.List.EditDistance.Defs /-! # Lowe...
Data\List\EditDistance\Defs.lean
/- Copyright (c) 2023 Kim Liesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Liesinger -/ import Mathlib.Algebra.Group.Defs /-! # Levenshtein distances We define the Levenshtein edit distance `levenshtein C xy ys` between two `List α`, with a customizable ...
Data\List\EditDistance\Estimator.lean
/- Copyright (c) 2023 Kim Liesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Liesinger -/ import Mathlib.Data.List.EditDistance.Bounds import Mathlib.Order.Estimator /-! # `Estimator` for Levenshtein distance. The usual algorithm for computing Levenshtein ...
Data\Matrix\Auto.lean
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.Expr import Mathlib.Data.Matrix.Reflection /-! # Automatically generated lemmas for working with concrete matrices In Mathlib3, this file contained...
Data\Matrix\Basic.lean
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Data\Matrix\Basis.lean
/- Copyright (c) 2020 Jalex Stark. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jalex Stark, Scott Morrison, Eric Wieser, Oliver Nash, Wen Yang -/ import Mathlib.Data.Matrix.Basic import Mathlib.LinearAlgebra.Matrix.Trace /-! # Matrices with a single non-zero elemen...
Data\Matrix\Block.lean
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin -/ import Mathlib.Data.Matrix.Basic /-! # Block Matrices ## Main definitions * `Matrix.fromBlocks`: build a block mat...
Data\Matrix\CharP.lean
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Data.Matrix.Basic /-! # Matrices in prime characteristic In this file we prove that matrices over a ring of charact...
Data\Matrix\ColumnRowPartitioned.lean
/- Copyright (c) 2023 Mohanad ahmed. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mohanad Ahmed -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Block import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! # Block Matrices from Rows and Columns T...
Data\Matrix\Composition.lean
/- Copyright (c) 2024 Yunzhou Xie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Yunzhou Xie -/ import Mathlib.Data.Matrix.Basic /-! # Composition of matrices This file shows that Mₙ(Mₘ(R)) ≃ Mₙₘ(R), Mₙ(Rᵒᵖ) ≃ₐ[K] Mₙ(R)ᵒᵖ and also different levels of...
Data\Matrix\DMatrix.lean
/- Copyright (c) 2021 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Algebra.Group.Hom.Defs /-! # Dependent-typed matrices -/ universe u u' v w z /-- `DMatrix m n` is the type of dependently typed matrices whose rows...
Data\Matrix\DualNumber.lean
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.DualNumber import Mathlib.Data.Matrix.Basic /-! # Matrices of dual numbers are isomorphic to dual numbers over matrices Showing this for the more g...
Data\Matrix\Hadamard.lean
/- Copyright (c) 2021 Lu-Ming Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lu-Ming Zhang -/ import Mathlib.LinearAlgebra.Matrix.Trace /-! # Hadamard product of matrices This file defines the Hadamard product `Matrix.hadamard` and contains basic properties ab...
Data\Matrix\Invertible.lean
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Data.Matrix.Basic /-! # Extra lemmas about invertible matrices A few of the `Invertible` lemmas generalize to multiplication of rectangular matrices. For ...
Data\Matrix\Kronecker.lean
/- Copyright (c) 2021 Filippo A. E. Nuccio. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Filippo A. E. Nuccio, Eric Wieser -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Block import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.Linear...
Data\Matrix\Notation.lean
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Eric Wieser -/ import Mathlib.Algebra.Group.Fin.Tuple import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.RowCol import Mathlib.Data.Fin.VecNotation import Mathlib.Ta...
Data\Matrix\PEquiv.lean
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.PEquiv /-! # partial equivalences for matrices Using partial equivalences to represent matrices. This file introduc...
Data\Matrix\Rank.lean
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Eric Wieser -/ import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.Linea...
Data\Matrix\Reflection.lean
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Data.Matrix.Notation import Mathlib.Data.Matrix.Basic import Mathlib.Data.Fin.Tuple.Reflection /-! # Lemmas for concrete matrices `Matrix (Fin m) (Fin n) α`...
Data\Matrix\RowCol.lean
/- Copyright (c) 2019 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Eric Wieser -/ import Mathlib.Data.Matrix.Basic /-! # Row and column matrices This file provides results about row and column matrices ## Main definitions * `Matrix.row r...
Data\Matroid\Basic.lean
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Set.Card import Mathlib.Order.Minimal import Mathlib.Data.Matroid.Init /-! # Matroids A `Matroid` is a structure that combinatorially abstracts the ...
Data\Matroid\Closure.lean
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Restrict import Mathlib.Order.Closure /-! # Matroid Closure A `Flat` of a matroid `M` is a combinatorial analogue of a subspace of a vector ...
Data\Matroid\Constructions.lean
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Restrict /-! # Some constructions of matroids This file defines some very elementary examples of matroids, namely those with at most one bas...
Data\Matroid\Dual.lean
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.IndepAxioms /-! # Matroid Duality For a matroid `M` on ground set `E`, the collection of complements of the bases of `M` is the collection o...
Data\Matroid\IndepAxioms.lean
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Basic /-! # Matroid Independence and Basis axioms Matroids in mathlib are defined axiomatically in terms of bases, but can be described just...
Data\Matroid\Init.lean
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Aesop /-! # Matroid Rule Set This module defines the `Matroid` Aesop rule set which is used by the `aesop_mat` tactic. Aesop rule sets only become visible once t...
Data\Matroid\Map.lean
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Constructions import Mathlib.Data.Set.Notation /-! # Maps between matroids This file defines maps and comaps, which move a matroid on one ty...
Data\Matroid\Restrict.lean
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Dual /-! # Matroid Restriction Given `M : Matroid α` and `R : Set α`, the independent sets of `M` that are contained in `R` are the independ...
Data\Matroid\Sum.lean
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Map import Mathlib.Logic.Embedding.Set /-! # Sums of matroids The *sum* `M` of a collection `M₁, M₂, ..` of matroids is a matroid on the dis...
Data\MLList\BestFirst.lean
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Batteries.Data.MLList.Basic import Mathlib.Data.Prod.Lex import Mathlib.Order.Estimator import Mathlib.Data.Set.Finite /-! # Best first search We perform bes...
Data\MLList\Dedup.lean
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Batteries.Data.MLList.Basic import Batteries.Data.HashMap.Basic /-! # Lazy deduplication of lazy lists -/ open Batteries namespace MLList variable {α β : T...
Data\MLList\DepthFirst.lean
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Lean.Data.HashSet import Batteries.Data.MLList.Basic import Mathlib.Control.Combinators /-! # Depth first search We perform depth first search of a tree or g...
Data\MLList\IO.lean
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Batteries.Data.MLList.Basic /-! # Reading from handles, files, and processes as lazy lists. -/ open System IO.FS namespace MLList /-- Read lines of text fr...
Data\MLList\Split.lean
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Batteries.Data.MLList.Basic import Mathlib.Data.ULift /-! # Functions for splitting monadic lazy lists. -/ namespace MLList universe u variable {α β : Type ...
Data\Multiset\Antidiagonal.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Powerset /-! # The antidiagonal on a multiset. The antidiagonal of a multiset `s` consists of all pairs `(t₁, t₂)` such that `t₁ + t₂ =...
Data\Multiset\Basic.lean
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Group.Nat import Mathlib.Algebra.Order.Sub.Canonical import Mathlib.Data.List.Perm import Mathlib.Data.Set.List import Mathlib.Init.Quot...
Data\Multiset\Bind.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.Multiset.Dedup /-! # Bind operation for multisets This file defines a few basic operations on...
Data\Multiset\Dedup.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Nodup /-! # Erasing duplicates in a multiset. -/ namespace Multiset open List variable {α β : Type*} [DecidableEq α] /-! ### dedup ...
Data\Multiset\FinsetOps.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Dedup import Mathlib.Data.List.Infix /-! # Preparations for defining operations on `Finset`. The operations here ignore multiplicities,...
Data\Multiset\Fintype.lean
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Fintype.Card /-! # Multiset coercion to type This module defines a `CoeSort` instance for multisets a...
Data\Multiset\Fold.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Bind /-! # The fold operation for a commutative associative operation over a multiset. -/ namespace Multiset variable {α β : Type*} ...
Data\Multiset\Functor.lean
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl, Simon Hudon, Kenny Lau -/ import Mathlib.Data.Multiset.Bind import Mathlib.Control.Traversable.Lemmas import Mathlib.Control.Traversable.Instances /-! # F...
Data\Multiset\Interval.lean
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Data.DFinsupp.Interval import Mathlib.Data.DFinsupp.Multiset import Mathlib.Order.Interval.Finset.Nat /-! # Finite intervals of multisets This file provide...
Data\Multiset\Lattice.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold /-! # Lattice operations on multisets -/ namespace Multiset variable {α : Type*} /-! ###...
Data\Multiset\NatAntidiagonal.lean
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal /-! # Antidiagonals in ℕ × ℕ as multisets This file defines the antidiagonals of ℕ × ℕ a...
Data\Multiset\Nodup.lean
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Range import Mathlib.Data.List.Pairwise /-! # The `Nodup` predicate for multisets without duplicate elements. -/ namespace Mult...
Data\Multiset\Pi.lean
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Data.Multiset.Bind /-! # The cartesian product of multisets ## Main definitions * `Multiset.pi`: Cartesian product of multisets indexed by a multise...
Data\Multiset\Powerset.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Sublists import Mathlib.Data.List.Zip import Mathlib.Data.Multiset.Bind /-! # The powerset of a multiset -/ namespace Multiset open List ...
Data\Multiset\Range.lean
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Basic /-! # `Multiset.range n` gives `{0, 1, ..., n-1}` as a multiset. -/ open List Nat namespace Multiset -- range /-- `rang...