---
url: /dyad/dev/stdlib/BlockComponents/components/Logical.LessEqual.md
description: >-
  Dyad Logical.LessEqual docs.  Output y is true, if input u1 is less or equal
  than input u2.
---

# `Logical.LessEqual` {#Logical.LessEqual}

Output y is true, if input u1 is less or equal than input u2.

The output is **true** if Real input u1 is less than or equal to Real input u2, otherwise the output is **false**.

This component extends from [`BlockComponents.Interfaces.PartialBooleanComparison`](../types/Interfaces.PartialBooleanComparison.md)

## Usage {#Usage}

`BlockComponents.Logical.LessEqual()`

## Connectors {#Connectors}

* `u1` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `u2` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `y` - This connector represents a boolean signal as an output from a component ([`BooleanOutput`](/stdlib/Dyad/connectors/BooleanOutput#BooleanOutput))

## Behavior {#Behavior}

$$ \begin{align}
y\left( t \right) &= \mathtt{u1}\left( t \right) \leq \mathtt{u2}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Output y is true, if input u1 is less or equal than input u2.

The output is **true** if Real input u1 is less than or equal to Real input u2, otherwise
the output is **false**.
"""
component LessEqual
  extends BlockComponents.Interfaces.PartialBooleanComparison
relations
  y = u1 <= u2
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": "≤",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end
```

```dyad
"""
Output y is true, if input u1 is less or equal than input u2.

The output is **true** if Real input u1 is less than or equal to Real input u2, otherwise
the output is **false**.
"""
component LessEqual
  "Connector of first Real input signal"
  u1 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 140, "x2": 0, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of second Real input signal"
  u2 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 700, "x2": 0, "y2": 800, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y = u1 <= u2
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": "≤",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Logical`](Logical.LessEqual.md)

  * [`LogicalValidation`](Logical.LessEqual.md)
