Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.
This repository was archived by the owner on Nov 6, 2026. It is now read-only.

wlog gets slow #806

Closed
Closed

Description

@cipher1024

The following code takes ~30s to execute because of wlog

import algebra.module
import data.real.basic
import data.set.intervals

variables {α : Type*}
  [add_comm_group α] [vector_space ℝ α]
  (A : set α) (B : set α) (x : α)

open set

def convex (A : set α) :=
∀ {x y : α} {a b : ℝ}, x ∈ A → y ∈ A → 0 ≤ a → 0 ≤ b → a + b = 1 →
a • x  + b • y ∈ A

lemma convex_Ioo (r s : ℝ): convex (Ioo r s) :=
begin
  intros x y a b hx hy ha hb hab,
  wlog h : x ≤ y using [x y a b, y x b a],
end

Activity

  1. cipher1024 commented on Mar 8, 2019

    @cipher1024
    CollaboratorAuthor

    @johoelzl Any idea why that would be the case?

  2. digama0 commented on Mar 8, 2019

    @digama0
    Member

    From the trace, it looks like the culprit is distrib_not in tauto. Why does wlog call tauto?

  3. cipher1024 commented on Mar 8, 2019

    @cipher1024
    CollaboratorAuthor

    Try calling tauto! instead. That might make things faster: we'll be getting classical.

  4. digama0 commented on Mar 8, 2019

    @digama0
    Member

    It did make things faster, although it just fails in this case. Why is this so slow in the first place? What is tauto doing here?

  5. cipher1024 commented on Mar 8, 2019

    @cipher1024
    CollaboratorAuthor

    I know why I put it there when I wrote the first version but I don't understand what it does anymore

  6. cipher1024 commented on Mar 8, 2019

    @cipher1024
    CollaboratorAuthor

    It has changed a lot

  7. cipher1024 commented on Mar 8, 2019

    @cipher1024
    CollaboratorAuthor

    you could replace it with skip

  8. johoelzl commented on Mar 9, 2019

    @johoelzl
    Collaborator

    The only place where tautology is used, is in the discharger, its last parameter. I wouldn't mind removing the discharger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions