Zulip Chat Archive

Stream: mathlib4

Topic: order.filter.basic


Johan Commelin (Dec 22 2022 at 08:34):

The amount of data.foobar in https://tqft.net/mathlib4/2022-12-22/order.filter.basic.pdf is quite unappetizing...

Patrick Massot (Dec 22 2022 at 09:30):

It all comes from data.set.finite which will unlock a lot of things.

Eric Wieser (Dec 22 2022 at 09:39):

We have to port all of data eventually!

Yury G. Kudryashov (Jan 21 2023 at 00:31):

All dependencies are ported (1 is pending review). I'm going to start porting Order.Filter.Basic.

Yury G. Kudryashov (Jan 21 2023 at 00:33):

Do we have tactic.monotonicity?

Yury G. Kudryashov (Jan 21 2023 at 00:34):

Probably, not yet.

Yury G. Kudryashov (Jan 21 2023 at 00:34):

:(

Heather Macbeth (Jan 21 2023 at 00:37):

No, current advice is to comment out any @[mono] and add a porting note. Although I think that with the new tag_attribute functionality we could create a mono "tag attribute" and then at least keep tagging things mono, maybe even make a quickie implementation of mono as apply_rules only using mono.

Heather Macbeth (Jan 21 2023 at 00:38):

In fact I can try that now.

Heather Macbeth (Jan 21 2023 at 00:38):

@Yury G. Kudryashov Are the mono turning up in Order.Filter.Basic for attribute-tagging or for proofs?

Yury G. Kudryashov (Jan 21 2023 at 00:42):

I don't know yet.

Yury G. Kudryashov (Jan 21 2023 at 00:43):

Even if it's used for proofs, it should be easy to unfold these usages.

Heather Macbeth (Jan 21 2023 at 00:44):

Heather Macbeth said:

maybe even make a quickie implementation of mono as apply_rules only using mono.

My guess is that this will work for about 75% of mathlib uses of mono.

Heather Macbeth (Jan 21 2023 at 04:35):

mathlib4#1740 for a (cheap, very partial) mono implementation.

Yury G. Kudryashov (Jan 21 2023 at 16:06):

I fixed most proofs.

Yury G. Kudryashov (Jan 21 2023 at 16:07):

Notable exceptions are filter_upwards (probably, can be implemented as a macro; didn't try yet) and category theory stuff.

Yury G. Kudryashov (Jan 21 2023 at 16:09):

I see that some classes like Functor, Monad, and their Lawful versions changed. It would be nice if someone who understands what's changed and what's wrong with "filter as a monad" (there are some comments about conflicting instances) will have a look.

Johan Commelin (Jan 21 2023 at 16:29):

@Yury G. Kudryashov Do you already have a PR to track that you are porting this file?

Johan Commelin (Jan 21 2023 at 16:29):

Because it doesn't show up as WIP on #port-status

Yury G. Kudryashov (Jan 21 2023 at 16:31):

https://github.com/leanprover-community/mathlib4/pull/1750 How do I update #port-status?

Johan Commelin (Jan 21 2023 at 16:35):

It should happend automatically

Johan Commelin (Jan 21 2023 at 16:35):

Can you please merge master into your branch?

Yury G. Kudryashov (Jan 21 2023 at 16:38):

Done.

Anatole Dedecker (Jan 21 2023 at 17:02):

I’ll send the version I have of filter_upwards in ~1h

Anatole Dedecker (Jan 21 2023 at 17:02):

Well or rather I’ll add it directly to the PR

Yury G. Kudryashov (Jan 21 2023 at 18:56):

@Anatole Dedecker Any progress?

Anatole Dedecker (Jan 21 2023 at 19:21):

I just pushed, sorry for the delay, I had to make it up to date. I fixed some of the proofs, but some of them give weird errors, I'm looking into it

Yury G. Kudryashov (Jan 21 2023 at 19:26):

I'll fix the rest.

Yury G. Kudryashov (Jan 21 2023 at 19:27):

Do we need these spaces in " with", " using"?

Anatole Dedecker (Jan 21 2023 at 19:29):

No we don't

Anatole Dedecker (Jan 21 2023 at 19:30):

There were in Mathport/Syntax so I kept them

Yury G. Kudryashov (Jan 21 2023 at 19:32):

One of the errors is here because we don't have docs#lift_pair

Anatole Dedecker (Jan 21 2023 at 19:34):

(If that wasn't clear, I'm looking into the failures that are linked to filter_upwards, because they suggest a bad implementation, not the other failures)

Anatole Dedecker (Jan 21 2023 at 20:02):

I just pushed a fix to the tactic (a missing withMainContext made that the tactic only knew the context of the lemma, not the current context of the goal)

Yury G. Kudryashov (Jan 21 2023 at 21:33):

Who should I ask about category theory stuff?

Yury G. Kudryashov (Jan 21 2023 at 21:33):

Do we want filter to be a monad? What are the issues with applicative instance?

Yury G. Kudryashov (Jan 22 2023 at 00:01):

applicative filter is used for topological_space (list _)

Yury G. Kudryashov (Jan 22 2023 at 07:32):

I created a few PRs that fix issues I found while porting to Lean 4: #18253, #18254 (on the queue), #18255

Yury G. Kudryashov (Jan 23 2023 at 02:48):

Ready for review.


Last updated: Dec 20 2023 at 11:08 UTC