Facts

The appellant, born in 1964, a certified commercial employee, was engaged from 1 February 2000 by [C1.] in [U.] as manager, then senior manager, deputy director and director of the Tax Advisory department. He was dismissed with effect from 31 July 2004, but was released from his obligation to work from 29 March 2004. During this period, he was placed on sick leave several times (50% or 100%).

From May 2004, he set himself up as an independent tax, financial and legal adviser. He achieved turnover of CHF 73,800 in the second quarter of 2004 and CHF 101,500 in the third quarter of 2004. The AHV Fund fixed his personal contributions on the basis of an income of CHF 130,000 for the period from May to December 2004.

Invoking psychiatric disorders since August 2005, he applied for disability insurance benefits on 27 June 2007. He obtained a full pension from 1 August 2006, reduced to a three-quarter pension from 1 March 2009.

On 19 July 2013 the appellant registered with the employer's pension fund, claiming a disability pension under occupational benefits on account of a bipolar disorder reducing his work capacity by at least 50% since 11 September 2003. The foundation denied its obligation to provide benefits on 23 December 2013.

Seised by the insured on 23 May 2014, the Cantonal Court of the Canton of Vaud, Social Insurance Chamber, dismissed the claim by judgment of 24 August 2015.

The appellant lodges a public law appeal. He primarily seeks the award, from 1 August 2006, of a full pension calculated under occupational benefits and extended benefits, and subsidiarily the annulment of the judgment and remittal of the case. He requests legal aid. Dispute: entitlement to a pension under compulsory occupational benefits (temporal connection) and entitlement to a pension under more extensive benefits.

Considerations

The Federal Supreme Court applies the law of its own motion (art. 106 para. 1 FSCA) but in principle examines only the complaints raised (art. 42 para. 2 FSCA). It is bound by the facts established by the lower authority (art. 105 para. 1 FSCA), unless they were established in a manifestly inaccurate manner or in breach of the law (art. 105 para. 2 FSCA). There is no disputed material connection between the incapacity for work and the disability; only the temporal connection remains in dispute.

As regards compulsory occupational benefits, the cantonal court found that there was no medically attested incapacity for work between 29 March 2004 and August 2005, and that the exercise of a gainful activity for more than three months interrupted the temporal connection. The complaint of breach of the right to be heard and of the inquisitorial principle (art. 73 para. 2 OPA, art. 61 let. c GSSLA, art. 6 ECHR, art. 29 Cst.) is redundant with the complaint of arbitrary assessment of the evidence. The judge may dispense with investigative measures through anticipatory assessment of the evidence if he is convinced that the facts are established to the standard of preponderant probability. The Federal Supreme Court intervenes only in cases of arbitrariness, and the appellant must demonstrate precisely why the assessment is untenable; appellate-type criticism is inadmissible. In this case, the question whether the requirements of reasoning are satisfied may be left open, since the cantonal court's assessment is not arbitrary.

As regards extended benefits, the pension regulations constitute the pre-formulated content of an innominate contract sui generis, interpreted according to the…